In a large, heavy-bottomed saucepan melt the butter over medium heat. Add onions, garlic, bay leaf, thyme and a pinch or two of brown sugar.
Cook the onions 25-35 minutes, stirring every few minutes until the onions are soft and caramelized. The onions should turn a deep brown color - if they begin to get burnt spots on them turn the heat down a little.
Remove the bay leaf and thyme sprigs. Stir in the squash and broth. Cook on medium-low an additional 15 - 20 minutes, stirring often and seasoning with salt and pepper to taste.
Preheat the broiler and place 4 oven-proof bowls or crocks onto a baking sheet. Ladle soup into each bowl and sprinkle the tops of each one with 1/2 - 3/4 cup of cheese.
Place under broiler until cheese is completely melted with bubbly, brown spots. Serve immediately with crusty bread if desired.