Preheat oven to 375º F (190º C).
Spread the sliced onions in a 9x13-inch (23x33 cm) baking dish, keeping the rings and layers intact. Drizzle with olive oil and season generously with salt and pepper.
Roast the onions in the preheated oven for 15 minutes, or until they are softened.
Increase the oven temperature to 450º F (230º C).
In a medium saucepan, combine the heavy cream, white wine, butter, garlic powder, and cayenne pepper (if using). Cook over medium heat until the butter is melted and bubbles form on the outside edge of the cream.
Remove the cream sauce from heat and pour it over the pre-roasted onions, making sure to cover all the onions. Sprinkle the grated parmesan cheese over the top.
Cover the baking dish with aluminum foil and bake for another 20 minutes. Remove the foil and bake for an additional 5-10 minutes, or until the onions are caramelized and the cheese is golden brown.
Remove the dish from the oven and serve hot. Enjoy!