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 5-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. Note: I usually use my 7-quart Dutch oven, but when I use my 5-quart, which is the more common size, I only cook for the additional 1 1/2 hour in the oven. The smaller pot browns the onions very deeply during this time and it happens faster.
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.
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 barely bring to boil. Reduce heat to low, cover, and simmer 30 minutes. Remove and discard herbs, then season with salt and pepper.
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.
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.