For custard, in a heavy saucepan, mix sugar and cornstarch; whisk in milk and egg yolks. Cook and stir over medium heat; bring to a gentle boil. Cook and stir 1 minute; remove from heat. Stir in butter until melted. Immediately transfer to a clean bowl; stir in vanilla. Press plastic wrap onto surface of filling; cool 30 minutes. Refrigerate until cold.
While custard is chilling, make cake layers. Preheat oven to 375°. Line bottoms of 2 greased 8-in. round baking pans with parchment; grease paper and dust with flour.
In a large bowl, cream sugar and shortening until light and fluffy, about 5 minutes. Add eggs, one at a time, beating well after each addition. Beat in vanilla. In another bowl, whisk flour, baking powder and salt; add to creamed mixture alternately with milk, beating well after each addition.
Transfer to prepared pans. Bake until a toothpick inserted in center comes out clean, 15-20 minutes. Cool in pans 10 minutes before removing to wire racks; remove paper. Cool completely.
For glaze, in a small saucepan, bring water and butter to a simmer; immediately remove from heat and whisk in cocoa powder. Beat in confectioners' sugar and vanilla until smooth; cool slightly.
Place one cake layer on a serving plate; spread with cold custard. Top with the second cake layer. Spoon chocolate glaze over the top, allowing it to drip down sides of cake. Refrigerate until serving.