Preheat the oven to 350 degrees F (175 degrees C). Lightly oil a 9-inch square baking pan.
Heat 3 tablespoons olive oil in a large skillet over medium heat. Saute chopped onion, green onions, and garlic in the hot oil until soft and lightly browned, about 5 minutes. Stir in spinach and parsley, and continue to saute until spinach is limp, about 2 minutes. Remove from the heat and set aside to cool.
Mix feta cheese, ricotta cheese, and eggs in a medium bowl until well combined. Stir in spinach mixture.
Lay one sheet of phyllo dough in the prepared baking pan, and brush lightly with olive oil. Lay another sheet of phyllo dough on top and brush with olive oil. Repeat the process with two more sheets of phyllo dough; the sheets will overlap the pan.
Spread spinach and cheese mixture into the pan. Fold any overhanging dough over the filling. Brush with oil.
Layer the remaining 4 sheets of phyllo dough, brushing each with oil. Tuck overhanging dough into the pan to seal the filling.
Bake in the preheated oven until golden brown, 30 to 40 minutes.
Cut into squares and serve while hot.