Coat a large saute pan with olive oil, add the onions and put the pan over medium heat. Season the onions with salt, to taste, and add a pinch of crushed red pepper flakes. Saute until the onions are translucent and very aromatic, about 7 to 8 minutes. Stir in the garlic and saute for 3 to 4 more minutes. Stir in the spinach, season with salt, to taste, and saute until the spinach is wilted, about 2 to 3 minutes. Remove from the heat and let cool. In a large bowl, add the ricotta, 1 cup of grated Parmigiano, the eggs and 1 cup of bechamel and stir to incorporate. Taste and adjust seasoning, if needed.