Warm the milk for the pastry cream in a saucepan over medium heat until steaming, not boiling.
Whisk yolks, sugar, cornstarch, and salt in a bowl until pale and smooth.
Temper the yolk mixture with a steady splash of hot milk, whisking constantly, then pour back into the saucepan.
Cook, whisking, until thick bubbles form. Remove from heat; whisk in butter and vanilla. Press plastic wrap onto the surface and chill until cold.
Heat oven to 350°F. Grease and line two 8-inch round cake pans with parchment.
Whisk flour, baking powder, and salt in a small bowl. Set aside.
Beat softened butter and sugar in a mixer until light and fluffy, about 2 to 3 minutes.
Beat in eggs one at a time, then mix in vanilla until smooth.
Mix in dry ingredients in three parts, alternating with the milk. Begin and end with dry ingredients; avoid overmixing.
Divide batter between pans. Bake 22–26 minutes, until a toothpick comes out clean. Cool 10 minutes, then turn out and cool completely.
Assemble the cake: Place one layer on a plate. Spread chilled pastry cream evenly over the top. Cap with the second layer. Chill 20 minutes.
Make ganache: Heat cream with corn syrup until just simmering. Pour over chocolate and butter. Let sit 2 minutes, then stir until glossy.
Cool ganache until slightly thickened, then pour over the chilled cake, letting it drip over the edges. Chill to set before slicing.