Scrub the skin of the squash thoroughly. Cut the squash vertically in half, and remove the seeds. Place the halves face down on the prepared baking sheet, and roast in the preheated oven until the skin is blistered and the flesh tender, about 40 minutes. Remove and allow to cool a little.
While the squash roasts, melt the butter in a large saucepan over medium-high heat. Add the onion, sage, and garlic to pan. Sauté until lightly browned, about 4 minutes. Add the red pepper and cumin, and then sauté 1 minute. Stir in 1 cup of the stock and cook 1 minute, scraping pan to loosen browned bits. Combine the onion mixture, remaining stock, beans, and roasted squash in the blender, in batches if necessary, and blend until smooth. Return everything to the pot. Stir in the milk and salt. Bring to a simmer and cook about 5 minutes, stirring occasionally. Season with more salt and freshly ground black pepper to taste.
While the soup cooks, add the parsley leaves, sage, pistachios, Parmesan cheese, and olive oil to the work bowl of the food processor. Pulse until smooth, about 2 to 3 minutes. Serve the soup with a dollop of the pesto on top of each bowl, and stir it in.