Wash and halve the pumpkin and spaghetti squash and scoop out the seeds. Cut both into large pieces and set on a baking sheet with the unpeeled garlic cloves and 1 rosemary sprig, and drizzle with olive oil. Season with salt and pepper, stir to coat with the oil, and bake for 30–35 minutes, until the pumpkin and squash are tender.
Meanwhile, heat a generous tablespoon of olive oil in a skillet over medium heat, add the leek and onion, and season with salt. Cook for about 10 minutes, stirring occasionally, until softened and browned. Remove from the heat and sprinkle with two-thirds of the thyme leaves.
Once the pumpkin and squash are cool enough to handle, scoop the flesh into a food processor or blender, then peel and add the garlic cloves. Add the onion-leek mixture and puree, gradually adding broth until the soup reaches the desired consistency. Taste and adjust the seasoning as needed.
Clean the mushrooms with a damp cloth, scrape off any dirt with a knife, and slice thinly. Heat a drizzle of olive oil in a skillet over medium heat and add the mushrooms, parsley, and a pinch of salt. Cook for 7–8 minutes, stirring occasionally, until the mushrooms are tender and browned.
Toast the bread and top it with the mushrooms. Finely chop the leaves of the remaining rosemary sprig and sprinkle over the mushrooms, followed by the Parmesan. Drizzle with white truffle oil and season with salt and pepper.
Ladle the soup into soup plates and garnish with the remaining thyme leaves and pumpkin seeds if using. Top with the porcini mushroom crostini.