Combine wine, 1/2 cup of the sherry, 8 tablespoons of butter, sugar, onions, and salt and pepper in a 9x13-inch casserole dish and braise, uncovered, stirring occasionally, until the onions just begin to brown, 40-45 minutes. Remove casserole from oven, cover with foil, and continuing braising in oven, about 1 hour. Keep onions warm.
Meanwhile, tie parsley, thyme, and bay leaves together with kitchen twine to make a bouquet garni. Put bouquet garni and broth into a pot and bring to a boil. Reduce heat to medium low and simmer, partially covered, for 30 minutes. Remove and discard bouquet garni. Stir in remaining sherry and cook for 5 minutes more.
WHile the broth simmers, spread the baguette slices with the remaining butter. Toast in a skillet over medium heat, turning once, until golden, 5-7 minutes. Rub slices generously with garlic and set aside. Discard any remaining garlic.
Heat broiler with rack 6" from element. Arrange 6 heatproof bowls on a foil lined baking sheet, divide onion and broth between bowls, and stir together. Place 2 baguette slices in each bowl. Top each with about 1 cup of gruyere cheese and 1/3 cup of parmigiano. Broil until cheese are browned and bubbly, 3-5 minutes. Serve immediately.