Preheat the oven to 375 degrees F (190 degrees C). To make the filling: Heat 1 tablespoon olive oil over low heat in an 8-quart deep pot. Add leeks and garlic; cook, stirring occasionally, until tender, about 5 minutes.
Increase heat to medium. Add spinach to pot in batches; cook until slightly wilted, about 5 minutes total. (Don’t overdo it. The spinach will keep cooking in the oven later.) Transfer to a bowl and let cool. Squeeze spinach dry in a clean kitchen towel. Stir in pepper and kosher salt. (Be careful with the salt because feta is salty.) Add feta, beaten eggs, dill, and lemon juice to spinach in bowl. Mix together with clean hands.
Coat a 9-inch square baking pan with a little of the 1/2 cup olive oil.
Unroll phyllo sheets on a work surface. Working with 1 sheet at a time, brush phyllo with a little of the remaining oil. Keep remaining sheets covered with a clean, dry kitchen towel as you work. Add 1 sheet to the dish, covering some of bottom of pan and overhanging edge slightly. Repeat with 7 more phyllo sheets, brushing each with more oil and alternating sides of the pan to get the whole pan covered. (You want layers of phyllo on the bottom and on the sides.)
Add filling. Fold phyllo hanging over pan sides on top of filling.
Working with 1 phyllo sheet at a time, brush 8 more sheets with oil and layer on top, overhanging sides. Fold in sides. Brush top with oil. Sprinkle top with flaky salt. Score top layers of phyllo with a paring knife to create 9 servings (this makes it easier to serve after it’s baked).
Bake until top is crispy and golden brown, about 45 minutes. Let stand 15 minutes before serving.