Preheat your oven to 350°F (175°C).
In a large skillet over medium heat, melt the butter and olive oil together.
Add the sliced onions and stir to coat, then sprinkle with sugar, salt, and pepper. Cook for about 20 minutes, stirring occasionally, until onions are caramelized and golden brown.
Add the minced garlic and cook for an additional 2 minutes, until fragrant.
Pour in the white wine and scrape the bottom of the skillet to deglaze. Let it simmer for 5 minutes until the liquid reduces slightly.
Stir in the beef broth, thyme, and Worcestershire sauce. Bring the mixture to a simmer and cook for about 5 minutes.
In the baking dish, layer half of the cubed bread at the bottom. Spoon half of the onion mixture over the bread, followed by half of the Gruyère and half of the Parmesan cheese. Repeat with remaining ingredients.
Cover the dish with aluminum foil and bake for 30 minutes.
Remove the foil and bake for an additional 10 minutes, or until the cheese is bubbling and golden brown.
Let the casserole cool for 5 minutes before serving.