Preheat your oven to 350°F (175°C). Grease a 9×13-inch baking dish with non-stick spray or line it with parchment paper for easy removal.
In a mixing bowl, whisk together the flour, cocoa powder, baking powder, baking soda, and salt. Set this mixture aside.
Make the Cake Batter
In a large bowl, using an electric mixer, beat the softened butter and granulated sugar together on medium speed until light and fluffy, about 3-4 minutes.
Add the eggs, one at a time, mixing well after each addition. Stir in the vanilla extract until well combined.
Gradually add the dry ingredients to the butter mixture, alternating with the buttermilk. Begin and end with the flour mixture, mixing until just combined. Take care not to overmix.
Bake the Cake
Pour the batter into the prepared baking dish and spread it evenly. Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted in the center comes out clean.
Allow the cake to cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.
Make the Custard Filling
In a medium saucepan, combine the milk, 1/3 cup sugar, cornstarch, and salt. Whisk together until smooth.
Heat over medium heat, whisking continuously until the mixture thickens and comes to a gentle boil. Once it starts to thicken, reduce the heat to low.
In a separate bowl, whisk the egg yolks. Slowly add about 1 cup of the hot milk mixture to the egg yolks, whisking constantly to temper the eggs.
Pour the tempered egg yolk mixture back into the saucepan with the remaining milk mixture.
Continue cooking over low heat, stirring constantly until the custard is thick and bubbly. Remove from heat and stir in the butter and vanilla extract.
Assemble the Cake
Once the cake has completely cooled, slice it horizontally into two layers.
Place one layer on a serving platter and spread half of the custard filling over the top.
Place the second layer of cake on top and spread the remaining custard over it.
Chill the assembled cake in the refrigerator while you prepare the chocolate glaze.
Prepare the Chocolate Glaze
In a small saucepan over low heat, combine the chocolate chips, heavy cream, and butter. Stir until the chocolate and butter melt and the mixture is smooth.
Glaze and Chill the Cake
Let the chocolate glaze cool slightly before pouring it over the chilled cake, allowing it to drip down the sides.
Smooth it out with a spatula if desired.
Refrigerate the cake for at least an hour to let the flavors meld together. Once chilled, slice and serve.
Notes
For best results, use fresh ingredients and allow the cake to chill for a few hours or overnight before serving.