Preheat the oven to 350° F. Grease a 9" x 5" loaf pan (you can also line it with parchment paper and then grease the parchment).
Whisk together the flour, custard powder, baking powder, and salt.
In the bowl of stand mixer (or in a large bowl with an electric handheld mixer), cream together the butter and sugar until pale in color and fluffy.
Add the eggs, one at a time, beating well after each addition.
Add the sweetened condensed milk and vanilla, alternating with the dry ingredients, in two parts, and mix until the batter just comes together.
Pour the batter into the loaf pan and bake for about 60 minutes, or until a tester inserted into the center comes out clean. Let the cake cool for at least 20 minutes before turning it out of the pan to finish cooling completely before glazing.
To make the glaze: Heat the chocolate with the cream in the microwave in 30-second increments, stirring between each until smooth and melted. Add the espresso powder, if using. Pour over the cooled cake.