Peel, core, and quarter the apples, then cut them into 1/4-inch slices. Transfer to a large bowl. Sprinkle with both sugars, sea salt, cinnamon, ginger, cardamom, allspice, and nutmeg. Toss thoroughly and let rest at room temperature for 1 hour.
Dust your work surface and rolling pin with flour. Roll out half the dough to fit a 9-inch pie dish, rolling from the center out. Check size by flipping the dish over the dough—it should extend 1½ to 2 inches beyond the rim. Lay the dough into the dish gently and trim excess, leaving about an inch overhang.
Roll out the remaining dough in the same manner. Lay it on parchment and refrigerate both doughs until needed.
Adjust your oven rack to the center and preheat to 400°F (200°C). Prepare a foil- or parchment-lined baking sheet.
Toss the cornstarch with the marinated apples. Transfer the apples into the prepared pie crust, pressing firmly to compact. Mound the fruit above the rim if necessary. Drizzle up to ¾ cup of the extracted juices over the filling. Dot the surface with small bits of butter.
Place the second dough round over the pie or cut into strips for a lattice. If using a full top crust, create steam vents with a sharp knife. Trim excess, fold the edge underneath, and crimp to seal.
Whisk the egg with a tablespoon of water and brush the mixture over the crust for a glossy finish.
Bake on the prepared sheet for approximately 75 minutes, rotating for uniform browning. If browning occurs too quickly, shield with a foil dome.
The pie is done when juices visibly bubble through the top crust. Alternatively, test internal temperature—it should reach 195°F. The apples should feel tender when pierced.
Cool the pie for a minimum of 2 hours before slicing to allow the filling to set properly.