To roast the butternut squash: Preheat the oven to 425F. Slice the squash in half lengthwise. Scoop out the seeds. Place the squash, cut side up, on a sheet pan, drizzle with olive oil, and season with salt and pepper. Place a few sprigs of thyme on top. Roast until the squash is fork tender, 50 to 60 minutes. Let cool. Scoop out the flesh and place in a food processor. Discard its skin.
Add the shallot to the food processor, along with the Parmesan and ricotta. Add a few gratings of nutmeg. Season with salt and pepper. Pulse until well combined. Transfer mixture to a piping bag.