First make the filling. Preheat the oven to 400F. Toss the squash together with the oil and lots of salt and pepper on a large baking sheet. Roast for 20 minutes. Toss the squash around so it cooks evenly and add the garlic cloves, still in their skins. Roast for a further 15 minutes.
Using a stick blender or in a food processor or bullet blender, blitz the squash together with the roasted garlic cloves, squeezed out of their skins and the thyme leaves until smooth. Season to taste and set aside to cool.
To make the pasta, blitz the flour and eggs together in a food processor until you have small crumbs. Gather about 1/2 tsp of these together and squeeze them into a ball. If they hold together, but the pasta is still slightly tacky it’s ready. If it is a little dry, add a splash of water and blitz again. If the mixture is too wet, add a little more flour.
Turn the pasta crumbs out onto a clean work surface and gather them into a ball. Knead for about 5 minutes until the dough puts up too much resistance to continue. Cover with food wrap and set aside to rest for 30 minutes.
To make the ravioli, divide the dough into two. Roll each out as thin as you can, using extra flour to stop the long sheets of dough sticking to themselves. If you have a pasta machine, gradually roll the dough until it is on the thinnest setting, switching to a thinner setting each time you pass the dough through the rollers.
Place 1 tbsp of the filling on the dough and brush around it with water. Fold the pasta over and press to form a ravioli shape. Use either a pasta cutting wheel, a small round pastry cutter or a ravioli stamp to cut out the ravioli. Set aside on a baking tray dusted with flour while you repeat until you’ve run out of filling. You should get 24 medium-sized ravioli.
If you’re adding bacon to the butter sauce, heat the oil in a small frying pan over a medium high heat. Once the oil is shimmering add the bacon and cook until crisp. Set the pieces aside to drain on a piece of paper lined with kitchen paper.
Cook the pasta for 4-5 minutes in a pan of boiling, salted water until it is just tender. Drain and set aside while you make the butter sauce, reserving a cupful of the pasta cooking water.
Heat the butter in a large non-stick frying pan, skillet or shallow casserole dish. Once it is frothing, stir only occasionally until the butter has started to turn a little nutty and brown.
Stir in the nutmeg, then add the sage leaves. Once they have turned dark green and started to crisp, add the cooked ravioli along with a little of the pasta cooking water and the bacon pieces, if using.
Reduce the heat to low, and stir the ravioli in the pan until the butter has formed a thin, slightly emulsified sauce that coats the pasta, adding more pasta water if needed.
Season the butter sauce with a little more salt, if needed, before serving in warm bowls topped with parmesan.