Preheat the oven to 400°F and line a baking sheet with parchment paper.
Roast the squash. Cut the squash in half vertically and use a spoon to scoop out the seeds. Drizzle with olive oil and pinches of salt and pepper and place cut side-down on the baking sheet. Prick the skin several times with a fork and roast for 40 minutes. Wrap the shallot, garlic cloves, and sage in a piece of foil with a drizzle of olive oil and a pinch of salt. Place in the oven and cook for 20 minutes. After roasting, let the squash, shallots, garlic, and sage cool for at least 30 minutes.
Make the pasta dough according to this recipe. Wrap the dough ball in plastic wrap and set aside to rest while you make the filling.
Make the filling. Pulse the walnuts in a food processor until very finely ground. Add the cooked shallot, garlic, and sage to the food processor. Measure 1½ packed cups of the squash, and transfer to the food processor. Add the vinegar, nutmeg, salt, and pepper and pulse until very smooth. Chill until ready to use.
Roll out the pasta according to the instructions in this recipe, skipping step 5 (the folding) and stopping after step 6 (after the sheets of pasta; before they get cut into strands). Spread the 4 pasta sheets on a well-floured work surface. Use a 1-tablespoon cookie scoop to portion the filling onto 2 of the pasta sheets (the spacing will depend on the size of your ravioli stamp). Place the remaining pasta sheets over the sheets that are dotted with filling. Gently press the dough around the filling to seal. Use a ravioli stamp or cutter to cut out ravioli shapes. Cook the ravioli in a pot of salted boiling water for 4 minutes. I like to drop them into the water as I’m ready to start my sauce so that they’re done around the same time.
Make the sauce. Heat the oil in a medium skillet over medium heat. Add the garlic and sage and cook for 3 minutes. Add the wine, thyme, and salt and cook, stirring, for 2 minutes.
Spoon the sauce over the ravioli and top with the walnuts and freshly ground black pepper. Add the roasted butternut squash cubes, sautéed kale, and grated pecorino, if desired.