Heat the oven to 350°F (177°C). The cake bakes most evenly when the oven is fully preheated before the pan goes in.
Warm the butter and brown sugar in a small saucepan over medium heat, whisking now and then until melted, then whisk constantly for 1 minute as the mixture thickens before stirring in the cinnamon and vanilla. The topping should look smooth, glossy, and amber colored, more like a loose glaze than a thin syrup.
Pour the caramel into an ungreased 9×2 inch pie dish or round cake pan, arrange the apple slices on top in slightly overlapping layers, and chill the pan for a few minutes while you mix the batter. This brief chill helps set the design so the apples stay in place when the batter is added.
Whisk together the flour, baking powder, cinnamon, nutmeg, and salt in a bowl. Mixing the dry ingredients first helps the spice and leavening distribute evenly through the cake.
Beat the softened butter on high speed for about 1 minute until creamy, beat in both sugars for about 1 minute, then mix in the eggs and vanilla, scraping the bowl as needed. The mixture should look lighter and smoother before the dry ingredients go in.
Add the dry ingredients to the bowl, turn the mixer to low, and slowly pour in the room temperature milk until the batter is just combined, finishing by hand if needed to catch any flour pockets. The batter will be slightly thick, and that thickness helps it sit over the apples instead of sinking straight through.
Take the pan from the refrigerator and spread the batter evenly over the apple layer. Use a gentle hand so the apple pattern stays in place under the batter.
Bake for 40-46 minutes, loosely tenting foil over the top halfway through so the surface does not brown too fast. The center is ready when a toothpick comes out mostly clean with a couple of moist crumbs, and you should feel slight resistance rather than wet drag.
Set the cake on a wire rack for 15 minutes, then invert it onto a serving plate or cake stand. A little caramel may run down the sides, which is normal and part of the appeal.
Cool the cake completely at room temperature before slicing for the neatest portions, or serve it warm if you do not mind messier slices. Cooling at room temperature keeps the crumb from turning overly dense.
Cover any leftover slices and refrigerate or freeze them as needed, thawing frozen slices at room temperature before serving. Freeze slices rather than the whole cake if you want the topping to look better after thawing.