Prepare the Potatoes: Start by peeling the potatoes and thinly slicing them into rounds. Place the potato slices in a bowl of cold water to prevent them from browning while you prepare the other ingredients.
Sauté the Mushrooms: In a large skillet, heat a drizzle of olive oil over medium heat. Add the sliced mushrooms to the skillet and cook until they are golden brown and tender, about 5-7 minutes. Remove the mushrooms from the skillet and set aside.
Sauté the Aromatics: In the same skillet, add another drizzle of olive oil if needed. Sauté the finely diced onion and minced garlic until they are soft and translucent, about 3-4 minutes. Add the dried thyme and rosemary to the skillet and cook for an additional minute to release their flavors.
Assemble the Cake: Preheat your oven to 375°F (190°C). Grease a round baking dish or cake pan with olive oil. Arrange a layer of potato slices on the bottom of the pan, overlapping slightly to form a base. Spoon half of the sautéed mushrooms and onion mixture over the potatoes, spreading it out evenly. Season with salt and pepper to taste.
Repeat the Layers: Repeat the process with another layer of potatoes followed by the remaining mushrooms and onion mixture. Press down gently to compact the layers and ensure even cooking.
Bake: Cover the baking dish with foil and bake in the preheated oven for 30-35 minutes, or until the potatoes are tender when pierced with a fork.
Add Cheese (Optional): If desired, sprinkle grated cheese over the top of the potato and mushroom cake during the last 10 minutes of baking. This will create a golden, bubbly crust that adds a decadent touch to the dish.
Garnish and Serve: Once the potato and mushroom cake is cooked through and golden brown on top, remove it from the oven and let it cool for a few minutes. Garnish with fresh parsley and serve warm, either as a side dish or a main course.