01 - Preheat the oven to 350°F. Grease and line an 8-inch round cake pan with parchment paper.
02 - Whisk together the flour, baking powder, cinnamon, nutmeg, and salt in a large bowl.
03 - Rub the cold butter into the flour mixture with your fingertips until it resembles coarse crumbs.
04 - Stir the sugar into the butter-flour mixture until evenly distributed.
05 - Whisk together the eggs, milk, and vanilla extract in a separate bowl until smooth.
06 - Add the wet ingredients to the dry mixture and stir until just combined. Do not overmix.
07 - Gently fold the sliced apples into the batter until evenly distributed.
08 - Pour the batter into the prepared cake pan, smooth the top, and sprinkle with demerara or granulated sugar.
09 - Bake for 45 to 50 minutes, or until a skewer inserted into the center comes out clean and the top is golden brown.
10 - Allow the cake to cool in the pan for 10 minutes, then transfer to a wire rack.
11 - Heat the milk in a saucepan over medium heat until just simmering. Do not boil.
12 - Whisk together the egg yolks, sugar, cornstarch, vanilla, and salt until smooth.
13 - Slowly pour the hot milk into the egg mixture while whisking constantly to temper the eggs.
14 - Return the mixture to the saucepan and cook over low heat, stirring constantly, until the custard thickens enough to coat the back of a spoon, about 5 to 7 minutes. Do not let it boil.
15 - Remove the custard from heat and serve warm with slices of apple cake.