Preheat the oven to 375 degrees. Coat a deep pie plate or cast iron skillet with butter and set aside.
Melt butter in a medium skillet and saute the leeks and garlic with a pinch of salt. After 8-10 minutes when the leeks are soft, add the spinach and nutmeg and a bit of freshly ground black pepper. Let cook until everything is softened and the liquid from the spinach has evaporated, about 10-15 minutes more. Turn off the heat and set aside.
Crack the eggs in a large bowl, add the salt and whisk well, for 2-3 minutes, until foamy. Add the gruyere cheese and leek/spinach mixture, stir well to combine, then scrape into your pan. Scatter the parmigiano cheese evenly over top and bake until browned on top and set in the middle, about 20-30 minutes.
Turn out onto a serving plate, or cut slices from the baking dish and serve warm or at room temperature.