Prepare the chocolate basque cake dough: Blend together flour, sugar, a pinch of salt, a tiny bit of baking powder, and cocoa powder with a few pulses. Add softened butter and pulse again. Add eggs and process until the dough comes together.
Form the base and border: Pipe out about half of the chocolate dough into a greased pizza pan. Cover the bottom and create a rope of dough along the rim. Smooth it out with the back of a teaspoon and scrape off any excess dough for a clean border.
Make the pistachio pastry cream: Heat milk with one-third of the sugar until boiling. In a bowl, mix egg yolks with the remaining sugar, then add flour and cornstarch and combine. Temper the egg yolks with hot milk, then pour back into the saucepan. Cook over medium heat, whisking continuously until thickened and boiling. Cook 2 more minutes, then incorporate pistachio paste.
Cool the custard: Spread the custard over a frozen baking tray lined with plastic wrap, cover with another plastic wrap, and refrigerate until completely chilled.
Assemble the gateau basque: Spread the chilled pistachio pastry cream evenly over the prepared chocolate dough base. Roll out the remaining chocolate dough into a thick disc and enclose the custard. Seal and remove excess dough.
Finish and bake: Prick the top with a fork, brush with egg whites only in a crisscross pattern. Bake in a fan oven at 330°F (160°C) for 40 minutes until done.