Peel 2 1/4 pounds of winter squash and cut into cubes. Preheat the oven to 450°F. In a large ovenproof pot, brown 2 slices of bacon 1/8 inch thick for 5 minutes, turning them over. Add the cubes of squash, 4 garlic cloves (unpeeled but crushed), 1 sprig of rosemary, and a little salt. Cover with parchment paper and put in the oven for 30 minutes. Lower the oven temperature to 350°F, remove the parchment paper, and cook for an additional 30 minutes. In the meantime, heat a dry skillet and toast a handful of dried pumpkin seeds. Cool on paper towels, then crush. When the squash is cooked, take the pot out of the oven and turn on the broiler. Throw away the rosemary and the peel of the garlic cloves. Remove the slices of bacon and cut into small lardons. Mash the squash and garlic with a fork and add the lardons. Stir and adjust the seasoning with plenty of freshly ground black pepper. Sprinkle the top of the gratin with pumpkin seeds. With a vegetable peeler, shave 1 ounce of pecorino or Parmesan cheese into small flakes and sprinkle evenly over the gratin. Put under the broiler for about 2 minutes to brown the top. Serve immediately.