Whisk the flour, salt, and sugar in a large bowl. Cut in the cold butter until the mixture resembles coarse crumbs with a few pea-sized pieces remaining. Gradually add ice water, 1 tablespoon at a time, until the dough just comes together.
Divide the dough into two portions, shape each into a disk, wrap, and refrigerate for at least 30 minutes. Meanwhile, preheat the oven to 425°F and place a baking sheet in the oven to heat.
In a large bowl, toss the sliced apples with granulated sugar, brown sugar, flour, cinnamon, nutmeg, lemon juice, vanilla, and salt. Let the mixture stand for 10 minutes so the apples begin releasing their juices.
Roll one chilled dough disk into a 12-inch circle and carefully fit it into a 9-inch pie dish. Spoon the apple filling into the crust, arranging the slices evenly and mounding them slightly in the center.
Roll out the second dough disk and place it over the apples. Trim the excess dough, crimp the edges to seal, and cut several vents in the top crust. Chill the assembled pie for 10–15 minutes.
Whisk the egg and milk together, then brush the top crust lightly with the egg wash. Sprinkle with coarse sugar if desired. Place the pie on the preheated baking sheet and bake at 425°F for 15 minutes.
Reduce the oven temperature to 375°F and continue baking for 35–40 minutes, or until the crust is deeply golden and the filling is bubbling through the vents. Cool on a rack for at least 2 hours before slicing so the filling can set.