Preheat the oven to 425°F (220°C).
Place one pie crust inside a 9-inch pie plate and gently press it against the sides.
Toss the apples with both sugars, flour, cinnamon, nutmeg, lemon juice, and vanilla.
Spoon the apple mixture into the crust and scatter small pieces of butter over the filling.
Lay the second crust over the apples, trim the edges, and crimp them closed. Cut several vents in the top.
Whisk the egg with water and lightly brush it over the pastry.
Bake for 20 minutes, then reduce the temperature to 375°F (190°C) and bake another 35–40 minutes.
Cool for at least 2 hours before slicing so the filling has time to set.