Preheat the oven to 200 degrees C and place a baking tray in the oven to warm. If necessary, roll out the pastry on a lightly floured surface until large enough to line a 23cm flan dish, about 3cm deep. Line the dish. Prick the base with a fork. Put the pastry case in the fridge for 15 minutes to rest – this will prevent the pastry from shrinking as it bakes.
Beat the eggs with the cream and season with nutmeg and pepper. Crumble the cheese evenly over the pastry, then scatter over the walnuts and ham. Place the flan dish on the hot baking tray and pour the egg mixture over the top.
Bake for 25–30 minutes until the tart is puffed and golden. Cut into wedges and serve hot. (It is also delicious served cold for a picnic.)