Grease a 28 x 18 cm (11 x 7 inch) deep baking tin.
Place the polenta, flour, xanthan gum, butter and sugar in a food processor and whizz until the mixture resembles fine breadcrumbs. Alternatively, mix together the polenta, flour and xanthan gum in a large bowl. Add the butter and rub in with the fingertips until the mixture resembles fine breadcrumbs. Stir in the lemon rind and sugar.
Add the egg yolk and enough cold water to form a dough. Press the pastry into the prepared tin and spread over the jam.
Place all the sponge ingredients in a food processor and whizz until smooth or beat together in a large bowl until light and fluffy.
Spoon the mixture into the baking tin and place in a preheated oven, 200°C (400°F), Gas Mark 6, for 20–25 minutes until just firm to the touch.
Remove from the oven and leave to cool in the tin. Scatter over the toasted almonds and cut into 12 slices.