Preheat your oven to 160⁰C/Fan 140⁰C/Gas Mark 3 then lightly grease a 23cm loose-bottomed flan tin.
To make the pastry… beat 100g butter and the icing sugar together in a large mixing bowl until soft and pale, then add 1 egg and beat again until smooth.
Fold in the plain flour, until the dough comes away from the sides of the bowl. Lightly dust your work surface with flour then knead until smooth. Shape into a ball, wrap in cling film and rest in the refrigerator for 1 hour.
Dust your work surface with flour then roll the pastry into a circle roughly 27cm diameter and 5mm thick. Lift using a rolling pin into the flan tin, press down the base and sides gently then trim off any excess with a sharp knife. Refrigerate for 15 minutes to rest.
Meanwhile, to make the frangipane... cream the caster sugar and remaining butter together in a large bowl until pale and fluffy.
Beat in the remaining eggs, one at a time, until the mixture is smooth, then stir in the almonds and cornflour.
Remove the pastry from the fridge. Thinly spread the jam over the base then spoon over the almond mixture levelling the surface. Arrange the raspberries over the top, pressing them into the mixture a little.
Bake in the centre of your preheated oven for 1 hour, until a skewer inserted into the centre of the sponge comes out clean.
Allow to cool in the tin for 15 minutes then slice and serve warm, or leave in the tin until completely cooled.