Heat 1 tablespoon olive oil over medium heat and add onions. Season with salt and pepper and cook for 5-10 minutes.
Add more oil to pan if necessary. Add mushrooms and cook for 10 more minutes until mushrooms are brown and onions are caramelized.
Preheat oven broiler.
Spray a large non stick saucepan with cooking spray. Add eggs and allow eggs to become firm, about 3-5 minutes. Sprinkle eggs with oregano and pepper.
Place pan under broiler so that top of eggs becomes cooked and slightly browned. I leave oven door open with handle protruding out of oven as it only needs 3 minutes under broiler.
Remove pan to stove top (no heat).
Scatter mushroom and onion mixture to eggs and sprinkle with shaved parmesan cheese.
Return pan to broiler for 3-5 minutes, until cheese turns golden brown.
Sprinkle with chili flakes if you are using.