Cook spaghetti according to package instructions in a large pot of salted water. Reserve 1½ cups pasta cooking water, then drain spaghetti.
In a large skillet, melt butter over medium heat. Add chopped onion and cook until softened, about 5 minutes.
Stir in tomato paste and cook for 2 minutes.
Add reserved pasta cooking water and bring to a simmer. Cook until sauce has thickened slightly, about 5 minutes.
Stir in balsamic vinegar and cooked spaghetti, tossing to coat pasta in sauce.
Off heat, add Parmesan cheese and toss to combine. Serve hot.
