Preheat your oven to 375°F (190°C) and position a rack in the middle. Butter and flour a 9-inch springform pan, tapping out any excess flour.
In a large bowl, whisk together the flour, baking powder, salt, and nutmeg until well combined.
Add the cold cubed butter to the flour mixture and use your fingertips to rub it in until the mixture resembles coarse crumbs.
In a separate bowl, whisk together the sugar, egg, milk, and vanilla until smooth.
Pour the wet mixture into the flour-butter mixture and stir just until combined. Do not overmix.
Fold in about two-thirds of the sliced apples into the batter.
Spoon the batter into the prepared pan and smooth the top. Arrange the remaining apple slices in a circular pattern on top, gently pressing them in slightly.
Sprinkle with demerara sugar for a crunchy finish, if using.
Bake for 45-50 minutes, or until golden brown and a toothpick inserted into the center comes out clean. Cover with foil after 30 minutes if browning too quickly.
Let the cake cool in the pan for 15 minutes before removing the sides of the springform pan.
For the custard sauce: Whisk together the egg yolks and sugar until pale and slightly thickened, about 2 minutes by hand.
Heat the milk in a medium saucepan until it just begins to simmer around the edges (do not boil).
Remove from heat and very slowly pour about half of the hot milk into the egg mixture, whisking constantly to prevent curdling.
Pour the tempered egg mixture back into the saucepan with the remaining milk.
Cook over low heat, stirring constantly with a wooden spoon, until the sauce thickens enough to coat the back of the spoon, about 5-7 minutes.
Remove from heat immediately and stir in the vanilla extract and salt. If any lumps form, strain the sauce through a fine-mesh sieve.
Serve the cake warm or at room temperature with warm custard sauce poured over individual slices.