Preheat the oven to 375° F. In a heavy-bottomed skillet, heat a little olive oil over medium heat and gently cook the sliced onion with a pinch of salt for 3 minutes, without allowing to color. Add the seeded and diced tomato and cook gently for 7 minutes. Season to taste, transfer to a bowl and set aside.
Sauté the mushrooms in a little olive oil over high heat for 3 - 4 minutes. Drain off any excess moisture. Season to taste, remove and set aside.
Sauté the potatoes in batches in some olive oil, over medium-low heat for 3 minutes. Return all the potatoes to the pan, add the garlic and cook for another minute. Season with salt and freshly ground black pepper and drain on paper towels.
Arrange a layer of potatoes in the bottom of a 2-quart, 8-inch-diameter round or oval baking dish and cover with a layer of the mushrooms, followed by a layer of spinach, then a layer of tomatoes. Bake for 30 - 45 minutes, covered with waxed paper. Sprinkle with rosemary leaves and parsley before serving.