Preheat oven to 350°F (175°C) and position a rack in the center. Line the bottom of a 9-inch springform pan with parchment, then grease the parchment and sides with butter or non-stick spray.
Whisk together the flour, sugar, oats, and salt. Cut in the cold cubed butter with a pastry cutter or two forks until the mixture resembles coarse, pea-sized crumbs. Refrigerate while you make the batter.
Peel, quarter, and core the apples, then slice each quarter thinly, about ¼ inch (6 mm) thick. Toss with a squeeze of lemon juice if not using right away to prevent browning.
In a large bowl, beat the room-temperature butter and sugar until pale and fluffy, about 2 to 3 minutes. Beat in the eggs one at a time, then stir in the vanilla.
In a separate bowl, whisk together the flour, baking powder, cinnamon, nutmeg if using, and salt.
Add the dry ingredients to the wet mixture along with the milk. Fold gently with a rubber spatula just until no dry flour remains; a few lumps are fine. Do not overmix.
Scrape the batter into the prepared pan and smooth the top. Arrange the apple slices in a single, even layer over the batter, slightly overlapping if needed. Scatter the chilled streusel over the apples and press down very gently.
Bake for 55 to 65 minutes, until the streusel is golden brown and a toothpick inserted into the center comes out with no wet batter. Tent loosely with foil for the final 15 minutes if the top browns too fast. Cool in the pan for at least 15 minutes before releasing the springform ring.
Whisk the egg yolks and sugar until pale. Heat the milk in a saucepan until steaming and just bubbling at the edges. Slowly whisk about half the hot milk into the yolks to temper, then pour back into the saucepan.
Cook over low heat, stirring constantly, until the custard thickens enough to coat the back of a spoon, about 3 to 4 minutes and 165 to 170°F (74 to 77°C). Remove from heat, stir in the vanilla, and strain through a fine-mesh sieve.
Dust the cooled cake with confectioners' sugar. Slice and serve with the warm custard sauce poured over each piece.