Cook the pasta according to package instructions so it is al dente.
Drain and rinse the canned black beans and set aside.
Peel the onion, ginger, and garlic and discard the peelings.
Chop up the onion, ginger, and garlic roughly. These do not need to be chopped up really fine as we will be adding the sautéed ingredients to a blender and blending them up so the result is a delightfully creamy pumpkin pasta sauce.
Add the oil to a large skillet and set it on a stove set to medium-high heat.
Then add the chopped onion, ginger, and garlic to the pot and let sauté for about 7 minutes. Stir this mixture often so the onions, ginger, and garlic do not burn.
Lower the temperature to medium-low heat and add the canned pumpkin, the coconut milk, and the spices and stir well until all ingredients are well blended and sauce is heated through - which should take about 5-7 minutes, depending on the temperature of the stove.
Turn off the stove. Then, carefully spoon, or our, the pumpkin sauce mixture into a blender or food processor and blend until it is smooth.
Add the cooked pasta and black beans to a large bowl.
Pour the blended pumpkin sauce into the bowl and toss until the pasta and beans are well coated.
Serve the pumpkin sauce with pasta and beans garnished with some fresh basil and sprinkled with parmesan cheese.