Heat oven to 350F and grease a large (9×13-inch, 3-quart or more) baking dish.
Heat a large skillet over medium heat, add olive oil. Once hot, add leeks and season with salt and pepper. Cook, stirring, until they’re tender and just starting to brown, about 10 to 15 minutes. Lower heat to medium-low if they’re picking up color too quickly.
Beat eggs with Mediterranean rub, salt and a lot of freshly ground black pepper. Whisk in milk.
Assemble by layering in prepared dish: 1/3 of grated cheese, 1/2 of each leeks and ham, next 1/3 cheese, remaining leeks and ham. Pour eggs over then sprinkle remaining cheese over the top.
Bake until gently set in center. It’s done when no liquid egg seeps into the gap formed where a knife inserted into the center and turned or pulled back slightly or a temperature of 165 to 170 degrees. Start checking at 55 minutes and then every 5 minutes after that until it’s done. Should the top brown too much before the center is set, put foil over the baking dish for remaining baking time.
Let rest on a cooling rack for 5 to 10 minutes before serving. Serve in squares or scoops.