Heat the oil in a pot set over medium heat. Add the onion and cook, stirring occasionally, until they start to become golden, sticky and almost caramelized, about 10 minutes. Add the stock, wine, tomato paste and rosemary, bring to a simmer, and simmer for 15 minutes. Season the soup with salt and pepper.
Set the oven rack 6" beneath the broiler. Preheat the broiler. Set 2 large heatproof soup bowls on a baking sheet. Set 2 baguette slices into each bowl. Ladle the soup into the bowls. Top with the cheese. Broil 2 to 3 minutes, or until the cheese has melted and is golden.