Warm a wide skillet over medium-low heat. Add olive oil and 2 tbsp butter.
Add sliced onions and about 1 tsp salt. Cook slowly, stirring often, until deep golden, 25–35 minutes.
Stir in garlic, thyme, and red pepper flakes. Cook 1 minute until fragrant.
Pour in balsamic vinegar and scrape up browned bits. Simmer 2 minutes until glossy, then keep warm on low.
Boil spaghetti in salted water until al dente. Reserve 1 cup cooking water, then drain.
Add pasta to the onions with a splash of pasta water and remaining 1 tbsp butter. Toss to coat.
Sprinkle in Parmesan, tossing and adding more pasta water as needed until saucy and silky.
Season with remaining salt and the black pepper. Finish with parsley and serve hot.
Notes
Variation ideas: Swap Parmesan for Pecorino Romano for a sharper bite, or add a splash of dry white wine with the vinegar. Stir in crisp pancetta or sautéed mushrooms for extra richness. Leftovers keep 3 days in the fridge; reheat gently with a spoonful of water to loosen the sauce.This recipe is an original creation inspired by classic Easy Caramelized Onion Pasta flavors. All ingredient ratios and instructions are independently developed.