Peel and thinly slice the onions. Place your largest pan on a medium heat for a min then drizzle in 2 tbsp olive oil. Add the sliced onions with a pinch of salt and fry gently for 8 mins till softened.
While the onions are cooking, peel and chop the carrots and sweet potatoes into 1-2 cm chunks. Peel and thinly slice the garlic cloves. Finely chop the rosemary leaves. Halve the chilli (if using) and flick out the seeds (or keep them in for a more fiery dish). Finely chop the chilli. Fill and boil the kettle.
When the onions have cooked for 8 mins, add all the prepped veg, rosemary, chilli and garlic to the pan. Add the tins of chopped tomatoes. Tip in the borlotti beans along with their liquid from the tin. Pour in 1L hot water from the kettle. Add a generous pinch of salt and pepper and bring everything up to a bubble.
When the tomato and veg packed sauce is bubbling, tip in the pasta. Clamp on the lid and cook for 15 mins, stirring halfway through.
After 15 mins, the pasta should be al dente (soft with a slight bite), the sweet potatoes tender and the sauce thick. Stir in the red wine vinegar then taste. Add more salt and pepper if you think it needs it Serve the pasta in warmed bowls topped with a good crack of pepper.