Preheat the oven to 350ºF. Grease and flour a round layer pan, 9 x 1 ½ inches.
In the bowl of a stand mixer fitted with the paddle attachment, combine all ingredients on low speed for 30 seconds. Scrape down the bowl. Continue to beat on high speed for 3 minutes, scraping the bowl occasionally. Pour the batter into the prepared pan.
Bake until a toothpick inserted in the center comes out clean, about 35 minutes. Cool 10 minutes, then remove from the pan to cool completely on a wire rack.
For the cream
Mix sugar, cornstarch, and salt in a 2 quart saucepan.
In a glass measuring cup, mix milk and egg yolks. Pour and stir the milk mixture gradually into the sugar mixture.
Cook over medium heat, stirring constantly, until the mixture thickens and boils. Boil and stir for one minute.
Remove from the heat. Stir in vanilla and cool completely.
For the chocolate glaze
Heat butter and chocolate in a 2 quart saucepan over low heat, stirring constantly until melted and smooth.
Remove from heat and stir in sugar and vanilla.
Stir in water, one teaspoon at a time, until smooth and of spreading consistency. The glaze should be just slightly runny but still solid.
Assemble the cake
Split the cake in half horizontally. Place the bottom half on a cake stand or plate.
Spread cream evenly on top to within ½ inch of the sides.
Place the top of the cake on top of the cream. Spread the top of the cake with chocolate glaze, letting it run slightly over the sides.
Notes
Tips for customizing your Boston cream pie recipe
Swap the chocolate topping for classic chocolate ganache
Make the yellow cake layers up to 3 months in advance, cooling, wrapping, and freezing, before thawing at room temperature for 30-60 minutes and proceeding with the recipe as written
Add up to 1 tablespoon rum or whiskey to the pastry cream filling at the end of cooking
For thicker cake layers, double the cake recipe and don’t cut them in half
Halve the chocolate portion for a thinner layer of topping