01 - Preheat oven to 350°F. Grease a 9-inch round cake pan and line the base with parchment paper.
02 - In a large bowl, sift together flour, baking powder, cinnamon, nutmeg, and salt until well combined.
03 - Add the cold cubed butter to the flour mixture. Rub into the dry ingredients with your fingertips until the mixture resembles coarse breadcrumbs.
04 - Stir in the granulated sugar, then fold in the sliced apples until evenly coated with the flour mixture.
05 - In a separate bowl, whisk together eggs, milk, and vanilla extract until fully incorporated.
06 - Pour the wet mixture into the dry ingredients. Mix gently until just combined, being careful not to overmix the batter.
07 - Spread the batter evenly into the prepared pan, smoothing the top. Bake for 50–55 minutes until golden brown and a skewer inserted into the center comes out clean. Cool in the pan for 10 minutes, then transfer to a wire rack.
08 - In a saucepan, heat 2 cups whole milk until just steaming. Do not allow the milk to reach a boil.
09 - While milk heats, whisk together egg yolks, granulated sugar, and cornstarch in a bowl until smooth and lump-free.
10 - Gradually pour the hot milk into the egg mixture while whisking constantly to prevent curdling. Return the combined mixture to the saucepan and cook over low heat, stirring continuously until thickened and coating the back of a spoon. Do not let the custard boil.
11 - Remove from heat and stir in vanilla extract. Serve the cake warm or at room temperature with warm custard poured over each slice.