For the best flavor, make the soup a day or 2 in advance. Alternatively, the onions can be prepared through step 1, cooled in the pot, and refrigerated for up to 3 days before proceeding with the recipe.
3 tablespoons unsalted butter , cut into 3 pieces
6 large yellow onions (about 4 pounds), halved and cut pole to pole into 1/4-inch-thick slices
2 cups water , plus extra for deglazing
1/2 cup dry sherry
4 cups low-sodium chicken broth
2 cups beef broth
6 sprigs fresh thyme , tied with kitchen twine
1 bay leaf
Ground black pepper
1 small baguette , cut into 1/2-inch slices
8 ounces shredded Gruyère cheese (about 2 1/2 cups)
1. For the soup: Adjust oven rack to lower-middle position and heat oven to 400 degrees. Generously spray inside of heavy-bottomed large (at least 7-quart) Dutch oven with nonstick cooking spray. Place butter in pot and add onions and 1 teaspoon salt. Cook, covered, 1 hour (onions will be moist and slightly reduced in volume). Remove pot from oven and stir onions, scraping bottom and sides of pot. Return pot to oven with lid slightly ajar and continue to cook until onions are very soft and golden brown, 1 1/2 to 1 3/4 hours longer, stirring onions and scraping bottom and sides of pot after 1 hour.
2. Carefully remove pot from oven and place over medium-high heat. Using oven mitts to handle pot, cook onions, stirring frequently and scraping bottom and sides of pot, until liquid evaporates and onions brown, 15 to 20 minutes, reducing heat to medium if onions are browning too quickly. Continue to cook, stirring frequently, until pot bottom is coated with dark crust, 6 to 8 minutes, adjusting heat as necessary. (Scrape any fond that collects on spoon back into onions.) Stir in 1/4 cup water, scraping pot bottom to loosen crust, and cook until water evaporates and pot bottom has formed another dark crust, 6 to 8 minutes. Repeat process of deglazing 2 or 3 more times, until onions are very dark brown. Stir in sherry and cook, stirring frequently, until sherry evaporates, about 5 minutes.
3. Stir in broths, 2 cups water, thyme, bay leaf, and 1/2 teaspoon salt, scraping up any final bits of browned crust on bottom and sides of pot. Increase heat to high and bring to simmer. Reduce heat to low, cover, and simmer 30 minutes. Remove and discard herbs, then season with salt and pepper.
4. For the croutons: While soup simmers, arrange baguette slices in single layer on baking sheet and bake in 400-degree oven until bread is dry, crisp, and golden at edges, about 10 minutes. Set aside.
5. To serve: Adjust oven rack 6 inches from broiler element and heat broiler. Set individual broiler-safe crocks on baking sheet and fill each with about 1 3/4 cups soup. Top each bowl with 1 or 2 baguette slices (do not overlap slices) and sprinkle evenly with Gruyère. Broil until cheese is melted and bubbly around edges, 3 to 5 minutes. Let cool 5 minutes before serving.