Prepare the Potato Purée: Peel and chop the potatoes, then boil them in salted water until tender (about 15-20 minutes). Drain and mash them while still warm. Stir in butter and gradually add milk until you reach a creamy consistency. Season with salt.
Cook the Spinach & Mushroom Layer: Chop the onion and slice the mushrooms. In a pan, heat olive oil over medium heat. Sauté the onions until soft, then add the mushrooms. Cook until they release moisture and become golden brown. Add the spinach, season with salt, black pepper, and red pepper flakes, and cook until wilted.
Assemble the Casserole: Preheat the oven to 375°F (190°C). Spread the potato purée evenly in a baking dish. Layer the spinach and mushroom mixture on top. (Optional: Sprinkle with cheese or breadcrumbs for added texture.)
Bake & Serve: Bake for 15-20 minutes until slightly golden on top. Serve warm and enjoy!