Preheat the oven to 350.
Whisk together the eggs, Parmesan, rosemary, salt, pepper, and red pepper flakes.
In a cast iron skillet, melt the butter. Add in the onion and saute until soft, about five minutes. Add in the greens and sun-dried tomatoes (optional) and allow them to saute slightly for another 1-2 minutes.
Turn the heat on the skillet down to low. Gently pour in the eggs. Using a rubber spatula, very gently move the eggs around a bit – not scrambling them – but rather, massaging them into the cracks and crevasses of the greens. The idea is to move the eggs around a bit to help the bottom cook.
After the bottom of the eggs are set and have started to slightly harden, transfer the skillet into the oven and allow it to cook for five more minutes, until the top of the frittata is set as well.