Put the sugar and butter in the bowl of an electric mixer fitted with a paddle attachment. Mix on medium speed until pale and fluffy. Reduce the speed to low and add the eggs, scraping down the sides to make sure all the ingredients are incorporated. Add the flour, salt, vanilla, ground almonds and baking powder and mix until you have a soft homogenous dough. Divide the dough into half, press into two flat squares and wrap each in plastic wrap. Refrigerate for 1 hour.
While the dough is resting, prepare the vanilla custard. Put the milk in a saucepan and heat to boiling point. Put the sugar, egg yolks and vanilla in a bowl and whisk by hand until creamy. Add the cornflour and dilute with a touch of the hot milk, then pour the egg mixture into the pan of hot milk and cook for 4 minutes, stirring often, until the custard thickens and coats the back of a spoon. Remove from the heat and plunge the pan into a sink of iced water to cool. Cover the top of the custard with plastic wrap to prevent a skin forming.
Grease a 20 cm round springform cake tin with butter. Roll out each portion of dough on a lightly floured work surface to 4–5 mm thick. Cut out a 26 cm round from each portion. Press one pastry round into the prepared tin to line the base and side. Place the other round on a plate and refrigerate both for 30 minutes.
Spread the cherry jam over the tart base and pour the custard evenly on top. Place the other pastry round over the custard. Trim the edges and tuck the dough neatly in at the sides. Return to the refrigerator for 30 minutes. Preheat the oven to 180ºC.
Brush the top of the tart with the egg wash. Return to the refrigerator for 10 minutes to dry, then use a fork to make a crisscross pattern on top. Bake for 30–40 minutes, or until cooked and golden. Remove from the oven, allow to cool and slice into wedges to serve.