Cook the pasta according to package instructions in a large pot of salted boiling water until al dente. Reserve 1/2 cup of pasta water, then drain the pasta and set aside.
In a large skillet, heat the olive oil over medium heat. Add the diced onion and sauté for about 3-4 minutes until translucent.
Stir in the minced garlic and sliced mushrooms. Cook for another 5-7 minutes until the mushrooms are tender and browned.
Add the fresh spinach to the skillet and cook until wilted, about 2-3 minutes. Season with oregano, red pepper flakes, salt, and pepper.
If using, stir in the heavy cream and let it simmer for 2 minutes. Add the cooked pasta to the skillet and toss to combine, adding reserved pasta water as needed to reach desired consistency.
Remove from heat and stir in the grated Parmesan cheese until melted and creamy. Adjust seasoning if necessary.
Serve warm, garnished with fresh parsley.