In a medium pot, whisk the sugar and cornstarch together until well combined.
In a separate bowl, whisk the milk and egg yolks together until well combined.
Slowly pour the milk mixture into the sugar mixture while whisking to remove any clumps.
Cook over medium heat, whisking continuously until bubbles start to burst through the surface. Once boiling, continue to cook while whisking for a full minute. The pastry cream will become thick like pudding. It should register 200°F on an instant-read thermometer.
Remove from the heat and whisk in the vanilla paste until well combined.
Press the pastry cream through a fine-mesh sieve to remove any bits of egg that may have scrambled.
Cover with plastic wrap touching the surface to prevent a skin from forming. Refrigerate for at least 2 hours before using it. Meanwhile, make the cake.
Make the Cake
Preheat the oven to 325°F. Grease the inside bottom and sides of two 9-inch round pans. Line the bottom of the pans with parchment paper cut to fit. Lightly grease the parchment paper. Dust the inside bottom and sides of the pan with flour, then tap out any excess. Set aside.
In a large bowl, beat the butter and sugar together on medium-high speed until light and fluffy, about 5 minutes. Add the eggs, one at a time, mixing for 20 seconds after each addition. Beat in the vanilla.
Combine the flour, baking powder, and salt in a medium bowl. Stir with a whisk and add half to the butter mixture. Beat on low speed until the flour is almost fully incorporated. Mix in the buttermilk, followed by the remaining flour mixture, and beat on low until just combined. Take care not to over-mix.
Divide the batter evenly between the prepared pans and bake for 20-22 minutes, until a toothpick inserted into the center comes out with only a few moist crumbs attached.
Cool in the pans for 10 minutes then transfer to a wire rack and allow to cool completely before assembling.
Assemble the Cake
Place one cake layer on a serving platter. Spread pastry cream evenly on top. Place the second cake layer on top and gently press down to adhere to the pastry cream. Refrigerate the cake while preparing the chocolate glaze.
Make the Chocolate Glaze
In a small saucepan over medium-low, heat the cream and corn syrup to a simmer.
Remove the pot from the heat and pour cream over the chocolate and let stand for 3 minutes. Whisk until smooth. Spread the glaze evenly over the top of the cake.
Refrigerate the cake, uncovered, for at least 2 hours (and up to 24 hours) before slicing and serving. If chilling for longer than 2 hours, allow the cake to come to room temperature before slicing and serving.
Notes
Cover leftover cake tightly and store in the refrigerator for 5 days.