Melt butter; cook onions with salt and brown sugar until deeply caramelized (55-70 min).
Stir in white wine; cook briefly, then add broths, thyme, bay leaves, pepper, and salt; simmer 30 min.
Toss sourdough cubes with olive oil, salt, pepper; bake at 350°F until crisp (15-18 min).
Ladle soup into oven-safe bowls, top with cheeses and croutons; bake at 500°F until bubbly (5-7 min).
Let cool 5 min before serving.