Cut the cake in half (horizontally), then spread the jam on top of one half and cover with the other half. Slice the cake into into 2cm thick strips.
Line a large glass bowl with half of the cake slices. Scatter 2 handful of raspberries on top (if used) then sprinkle 2 Tbsp sherry over them. Rest in the fridge whilst you make the custard.
Heat the milk with 1 pinch of salt. When it reaches boiling point, pull it off the stove. Add the vanilla pod bits and the seeds, rest for 15 minutes.
Whisk the egg yolks lightly with the sugar, then mix in the flour or cornstarch.
Remove the vanilla pod bits from the milk, then heat it again to boiling point and pour over the egg mixture, stirring constantly. Pour this back into the pan and cook gently over low heat, stirring, until you get a thick cream which coats the back of a wooden spoon. Remove the pan from the stove, cover and let the custard cool.
When the custard has completely cooled, pour half it over the lined cake slices.
Add the remaining cake slices, raspberries, 2 Tbsp Sherry and the remaining custard.
Beat the whipping cream and remaining sherry until light and fluffy.
Spread or pipe the whipped cream over the top of the trifle, then cover and rest in the refrigerator for at least 3 hours, preferably overnight.
Serve with fresh raspberries, glacé cherries or toasted almond flakes before serving.