Finely chop the red onion and the garlic.
Preheat the oven to 350 ℉ (180 ℃) with convection (fan).
In a cast iron skillet or a pan that can go into the oven, add the olive oil and fry the onions until they are soft.
Add the chopped garlic and chili flakes and fry for 30 seconds. Then add the tomatoes, spinach, oregano, basil, salt and pepper, mix well, and let simmer for 10 minutes.
Add the chickpeas, mix well and turn off the stove.
Cut the feta cheese into 2 or 3 blocks and carefully place them on the sauce.
Put the skillet in the oven and bake for 15 minutes until the cheese is soft. Done!