Preheat the oven to 400°F (200°C).
Add cashews to a heatproof bowl and cover with boiling water to soak. Set aside.
Spread diced pumpkin and unpeeled garlic cloves on a baking sheet. Drizzle with 2 tablespoons olive oil and sprinkle with vegetable stock powder. Toss to coat, then roast for 40 minutes, or until pumpkin is golden and soft.
While the pumpkin is roasting, combine basil, garlic, olive oil, cashews, lemon juice, and salt in a food processor. Blend until mostly smooth with small chunks remaining. Taste and adjust seasoning as needed. Set aside.
Bring a large pot of salted water to a boil. Cook the pasta according to package directions. Drain and return to the pot.
Once the roasted garlic is cool enough to handle, peel away the skins. Add roasted pumpkin, peeled garlic, soaked cashews, soy milk, lemon juice, miso paste, and nutritional yeast to a blender. Blend until completely smooth. If using a closed blender like a Nutribullet, make sure the mixture has cooled before blending.
Pour the creamy pumpkin sauce over the cooked pasta and stir to coat evenly. Divide into bowls and top with spoonfuls of basil pesto and plant-based parmesan cheese, if using.