Brown the onions in a skillet until translucent.
Add the mushrooms and garlic to the pan and cook for 2 minutes more.
Add in the spinach and cook until the spinach is slightly wilted.
Add the rice, feta, and egg and sour cream mixture to the veggies and mix well to combine
Transfer the casserole to a large baking dish and bake for 30 minutes, at 425 degrees.
To keep the casserole from becoming too crispy on top, cover it with foil for the first 25 minutes of baking!