Preheat the oven to 350 degrees. Line a 8x8 pan with parchment and spray lightly with cooking spray. Set aside.
In a large bowl, whisk the flour, powdered sugar, baking powder and salt. Add the butter, eggs and vanilla and beat with an electric mixer until a dough forms.
Spread the dough in the bottom of the pan in an even layer and bake for 18-20 minutes, or until a toothpick comes out cleanly. Remove and let the cake cool completely.
In a medium sized saucepan, pour the milk and sugar and whisk over medium heat until the sugar dissolves–don’t let the mixture boil.
In a medium sized bowl, whisk the cornstarch and egg yolks together.
Temper the eggs by pouring a small amount of the heated milk into the bowl while whisking.
Continue to add the milk to the eggs, whisking continually.
Once mixed, pour the custard back into the saucepan and return it to the heat and whisk until the mixture starts to thicken.
Remove from heat and add the butter and vanilla and whisk until smooth.
Pour the custard over the top of the cake and smooth into an even layer.
Place the pan in the refrigerator for 2 hours to allow the custard to set.
To make the ganache, heat the heavy cream in a microwave safe cup until just simmering.
Pour over the chocolate and let it sit for about 2 minutes before whisking until smooth.
Pour the ganache over the top of the cooled custard and return it to the refrigerator for about 30 minutes for the chocolate layer to set.
Once cooled, slice into bars and serve!
Store any leftovers in an airtight container in the refrigerator for up to 3 days.