Place an oven rack on the center shelf and preheat the oven to 350 degrees F.
Prepare the filling: In a large bowl, toss together the pears and lemon juice. In a separate bowl, combine the flour, both sugars, salt, cinnamon, and allspice. Stir in the melted butter and vanilla, followed by flour mixture, tossing until evenly combined.
Prepare the topping: In a medium-sized bowl, whisk together the flour, sugar, baking powder, and salt. Use a spatula to stir in the egg.
Pour the filling into a 9-inch pie dish. Spoon the topping over the filling and top with pieces of butter.
Place the pie dish on a baking sheet, and bake for 50-55 minutes, or until the topping is golden brown and the filling is bubbling up around the sides.
Serve warm (I recommend serving with vanilla ice cream). Store leftovers by wrapping the pie dish tightly in plastic wrap, or transferring to an airtight container, and enjoy within 5 days.
Notes
Good baking pears include Bartlett, Anjou or Bosc. You can use one type or a mix. Avoid comice pears; they can be overly juicy (you could get away with 1-2 total). Aim to use pears that are ripe but not mushy so that they maintain their shape. To test for ripeness: press gently against the neck of the pear. The fruit should give slightly but still hold its shape without bruising or denting.