Preheat oven to 180°C. Line a baking tray with non-stick baking paper. Place the flour and butter in a food processor until the mixture resembles fine breadcrumbs. Add the pecorino or parmesan and process until well combined. Add the egg and water, and process until the mixture comes together. Turn onto a clean work surface and bring the dough together. Wrap in plastic wrap. Place in the fridge for 20 minutes to rest.
Meanwhile, use scissors to cut the tomatoes into small bunches, leaving the truss intact. Place on the prepared tray and spray with oil. Season with salt and pepper. Bake for 15-20 minutes or until the tomatoes start to soften slightly.
To make the filling, place the spinach in a sieve and use your hands to squeeze out as much liquid as possible. Combine the spinach, feta, ricotta, shallot, dill and lemon rind in a large bowl. Add the egg and stir until well combined. Season with salt and pepper.
Divide the pastry into 2 portions. Roll out each portion on a lightly floured surface until 5mm thick. Line two 35 x 11cm (base measurement) fluted tart tins, with removable bases, with the pastry and trim excess. Place in the fridge for 20 minutes to rest. Line with non-stick baking paper and fill with pastry weights or rice. Bake for 10 minutes. Remove the paper and pastry weights or rice. Bake for a further 5 minutes or until light golden.
Divide the filling among the pastry cases. Bake for 35-40 minutes or until firm and golden. Set aside to cool slightly. Top with the tomatoes.