On the day before, roll out the pastry on a lightly floured surface and use to line a loose-bottomed 23cm/9in tart tin. Chill in the fridge for at least 30 minutes and preheat the oven to 200C/gas 6/fan 180C.
Line the pastry case with baking parchment and fill with baking beans. Bake for 15 minutes, then remove the paper and beans and brush the pastry all over with beaten egg. Return to the oven for 10 minutes until lightly browned, then leave to cool in the tin. Once cold, tent loosely with foil and keep in a cool place.
Make the tomato sauce. Heat the oil in a very large heavy-bottomed frying pan and fry the onion, celery and garlic for 10 minutes until soft and transparent. Add the remaining ingredients and simmer for at least 30 minutes until the sauce is thick and jammy. Remove the bay leaf. You can use the sauce as it is, or make a coarsely textured puree in the food processor to give it enough bite to complement the heavenly, trembly custard that comes to rest on it. Leave to cool, then keep in a covered container in the fridge.
On the day, preheat the oven to 160C/gas 3/fan 140C and put a large baking sheet in the oven to heat up. Make the saffron custard. Warm 4 tbsp cream in a small pan with the saffron threads and their water, then infuse for 5 minutes. Beat the eggs and yolks in a jug; stir in the remaining cream and the saffron cream (do this with a fork, as saffron threads wrap round a whisk). Season to taste with salt and pepper.
Spread about half the tomato sauce over the pastry, to come almost halfway up the pastry case (freeze the rest to use another time). Place on the heated baking sheet, then very carefully pour in the saffron custard (you may not get it all in if your tin is shallow, but it doesn’t matter). Bake for 30-40 minutes until the custard is tremblingly set and has turned an intense golden colour with brown patches.
To serve, cool for 10 minutes, then transfer to a serving platter. Leave at room temperature and serve scattered with basil leaves.