Method
Clean and cut the pumpkin into cubes and set aside. In a non-stick pan, season two tablespoons of oil with the rosemary and the two cloves of garlic, then add the pumpkin. Mix thoroughly, add salt and add 300 ml of water. Cook for about 15 minutes until the pumpkin is tender.
Drain and rinse the cannellini beans, pour them into the pumpkin pot and leave them to flavor for a few minutes. Take a few pieces of pumpkin and some beans and set them aside.
With an immersion blender, purée the pumpkin and cannellini beans. Season with salt and pepper.
Bring abundant salted water to a boil, pour in the pasta and cook for 6/7 minutes (generally the spelled pasta cooks in 9/11 minutes), we will finish cooking in the pan with the pumpkin and the cannellini beans. While the pasta is cooking, put the pumpkin purée back on the heat, add a ladle of pasta cooking water and, when hot, add the pasta (keep the cooking water aside in case it is needed to finish cooking). Cook for another 3 minutes, taking care not to over-dry the sauce, it must be soft. Serve immediately, add a drop of oil and freshly ground black pepper. Serve with grated Parmesan.