Bring a large pot of salted water to a boil. Add the potatoes and cook until they are just tender when pierced with a knife, about 20 minutes. Drain and let cool slightly.
Preheat the oven to 425°F (220°C) on the broil setting. Slice each potato in half and arrange cut-side down on a parchment-lined baking sheet brushed with olive oil. Roast until the edges are golden and crisp, about 20 minutes.
Grease a 9-inch (23cm) pie dish with olive oil. Transfer the roasted potatoes to the dish, arranging them to cover the bottom and sides. Use a glass or measuring cup to gently press down, flattening them into an even layer to form a crust. Brush with olive oil, season with salt and black pepper, and return to the oven. Broil until golden brown and crisp, 20 to 30 minutes.
Meanwhile, heat 2 tablespoons of olive oil in a large skillet over medium heat. Add the leeks and cook until softened, about 5 minutes. Stir in the mushrooms and cook until they release their moisture and begin to brown, another 5 minutes. Add the spinach and cook until wilted, about 2 minutes. Season with salt and black pepper.
In a bowl, whisk together the eggs and heavy cream. Season with salt and black pepper.
If using, sprinkle the Parmesan over the potato crust. Spoon the sautéed vegetables evenly over the crust. Pour the egg mixture on top, making sure it fills all the gaps. Arrange the red onion rings over the surface.
Reduce the oven temperature to 350°F (170°C). Bake until the top is golden and the center is just set, about 40 minutes.
Let the quiche rest for 10 minutes before slicing. Serve warm or at room temperature.