01 - Preheat the oven to 350°F. Grease a 9-inch tart or quiche pan with butter.
02 - Roll out the shortcrust pastry and fit it into the prepared pan. Trim any excess dough and prick the base with a fork. Refrigerate for 10 minutes.
03 - Heat olive oil in a skillet over medium heat. Sauté the chopped onion until translucent, about 2 minutes. Add minced garlic and cook for 30 seconds.
04 - Add the spinach to the skillet and cook until wilted and liquid has evaporated, approximately 3 to 4 minutes. Remove from heat and allow to cool slightly.
05 - In a large bowl, whisk together eggs, milk, cream, nutmeg, salt, and pepper until smooth. Stir in half of the grated cheese.
06 - Spread the cooled spinach mixture evenly over the pastry base. Pour the egg custard over the spinach. Sprinkle the remaining cheese evenly on top.
07 - Bake in the preheated oven for 35 to 40 minutes, until the custard is set and the surface is golden brown.
08 - Allow to cool for 10 minutes before slicing and serving.