Bring the stock to the boil in a pan. Stir in the polenta and simmer over a low heat for 15 minutes, stirring regularly, until thickened.
Brush a square tin with 1 tbsp oil and pour in the polenta. Spread out evenly with a wet spoon. Set aside to cool for 30 minutes.
Meanwhile, mix the cheese with the sour cream and season with salt and pepper.
Grate the Parmesan and mix half of it into the sour cream mixture.
Wash and slice the tomatoes.
Turn out the polenta from the tin and cut into slices.
Brush a baking dish with the remaining oil and layer the polenta slices, alternating with the cheese mixture and tomato slices.
Sprinkle with the remaining Parmesan and bake in a preheated oven at 200°C (180°C fan, gas 6) for 25 minutes.