Melt butter in a large soup pot over medium heat. Cook and stir onions, garlic, salt, black pepper, and thyme until onions are soft and brown, about 30 minutes. Pour in red wine and sherry; bring to a boil. Reduce heat to low and simmer until you can no longer smell alcohol cooking off, about 15 more minutes.
Sprinkle onion mixture with flour and stir until coated; cook for 10 minutes. Pour in broth, stir to blend in flour, and simmer until slightly thickened, about 20 minutes.
Preheat oven to 350 degrees F (175 degrees C) while soup is simmering. Arrange bread slices on a baking sheet and drizzle with olive oil.
Toast the baguette slices in the preheated oven until golden brown, 12 to 14 minutes, turning the bread over halfway through cooking. Remove toast and set aside.
Set an oven rack about 8 inches from the heat source and turn on the oven's broiler.
Ladle soup into 6 oven-proof crocks, filling them about 3/4 full. Place 1 or 2 bread slices into the bowls and top each with a slice of Swiss cheese and a slice of provolone. Carefully place filled crocks onto a sturdy baking sheet.
Broil soup until the cheese is browned and bubbling, 3 to 4 minutes.