|Preheat oven to 375. |
Saute onion, salt, basil, and oregano in 2 T oil for 5 minutes.
Add spinach and cook over high heat for at least 5 minutes, until spinach becomes limp.
Turn down to medium, stir in garlic and flour, and cook for another 2 or 3 minutes.
Remove from heat and stir in the cheese and pepper. Taste and add more salt and pepper as desired.
Lay out a sheet of filo in the baking dish (it will overlap the sides). Brush with oil, lay another on top, brush with oil, and repeat for a total of 8 sheets.
Spread half of the spinach mixture over the dough. Lay out another 8 sheets of filo as above. Spread the rest of the spinach on top, then lay out the rest of the filo.
Brush the top with oil and tuck the filo sheets into the pan.
Bake uncovered for 45 minutes, until golden-brown and crispy.