Preheat your oven to 400°F. Place the garlic cloves on a small piece of foil, drizzle with a little olive oil, and wrap them up. Roast in the oven for about 20 minutes until soft and fragrant.
In a large pot, heat the olive oil over medium heat. Add the chopped onion and sauté for about 5-7 minutes until translucent.
Remove the roasted garlic from the oven, and squeeze the cloves out of their skins into the pot with the onions. Stir to combine.
Add the pumpkin puree, vegetable broth, dried sage, salt, and black pepper to the pot. Bring to a simmer and cook for about 10 minutes, stirring occasionally.
Remove the pot from heat and stir in the heavy cream and Parmesan cheese until well combined.
In a blender or food processor, combine the fresh basil, toasted walnuts, and lemon juice. Blend until smooth to create the pesto.
Serve the soup hot, drizzling a spoonful of the basil pesto on top of each bowl.