3 tablespoons unsalted butter, cut into 3 pieces
6 large yellow onions (about 4 pounds), halved and cut into ¼-inch thick slices
2 cups water, plus extra for deglazing
½ cup dry sherry
4 cups 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 ½-inch slices
8 ounces shredded Gruyere cheese (about 2½ cups)
1. For the soup: Adjust oven rack to lower-middle position and heat oven to 400 degrees F. Generously spray inside of heavy-bottomed large (at leasts 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½ to 1¾ 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 if necessary. (Scrape any crust that collected on spoon back into onions.) Stir in ¼ 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 ½ 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¾ cups soup. Top each bowl with 1 or 2 baguette slices (do not overlap slices) and sprinkle evenly with Gruyere. Broil until cheese is melted and bubbly around edges, 3 to 5 minutes. Let cool 5 minutes before serving.