In a large bowl, whisk together the flour, sugar, baking powder, and salt.
Using your fingertips or a pastry cutter, work the cold cubed butter into the flour mixture until it resembles coarse crumbs.
Add the eggs, sour cream, and vanilla extract, mixing just until the dough comes together. Be careful not to overwork the dough.
Divide the dough into two portions: ⅔ for the base and ⅓ for the top. Wrap each portion in plastic wrap and refrigerate for at least 30 minutes.
Peel, core, and thinly slice the apples (approximately ¼-inch thickness). In a large bowl, toss the apple slices with lemon juice to prevent browning.
In a separate small bowl, mix the sugar, cinnamon, nutmeg, and cornstarch. Sprinkle this mixture over the apples and gently toss until evenly coated. If using, add the rum-soaked raisins.
Preheat your oven to 350°F (175°C) and line a 9x13-inch baking pan with parchment paper, leaving some overhang for easy removal.
Remove the larger portion of dough from the refrigerator. On a lightly floured surface, roll it out to fit the bottom and slightly up the sides of your baking pan (approximately ¼ inch thick).
Transfer the dough to the prepared pan, pressing it gently into the corners. Prick the bottom several times with a fork to prevent bubbling during baking.
Arrange the apple filling evenly over the dough base, creating a generous layer.
For the top crust, either roll out the remaining dough and cut into strips to create a lattice pattern, or grate the cold dough directly over the apples for a rustic crumble topping.
If making a lattice top, brush with beaten egg for a golden finish.
Bake for 45-50 minutes, or until the crust is golden brown and the apple filling is bubbling slightly at the edges.
Allow to cool in the pan for at least 30 minutes before lifting out using the parchment overhang.
Dust with powdered sugar and a pinch of cinnamon before serving.