Sift the flour and icing sugar into a food processor, add the vanilla sugar and butter and blend until the mixture resembles coarse breadcrumbs. Add the egg yolks and blend to make a thick paste. Wrap in clingfilm and chill for at least 3 hours or overnight.
Grease and line an 18–19 cm (7–7½ inch) square shallow baking tin with nonstick baking paper. Press half the dough into the tin, spreading it into the corners with your fingers so the dough forms an even layer. Spread the jam over the dough, leaving 1 cm (½ inch) clear around the edges.
Roll out the remaining dough on a floured surface to the same dimensions as the tin and lift into place. Press down gently and brush with the beaten egg. Bake in a preheated oven, 190°C (375°F), Gas Mark 5, for 40–45 minutes until risen and deep golden. Leave to cool in the tin before transferring to a flat plate or board. Dust lightly with vanilla sugar and cut into 25 squares.