*Note: Look for a 20-ounce bag of fresh, already peeled and cubed squash from your supermarket. If you can't find any, cut a medium squash in half lengthwise and place cut side down on prepared baking sheet; roast until tender, about 45 minutes. Scoop the squash out of skin into a large bowl, mash with a spoon and proceed as above.
Alternatively, you can microwave cubed squash, covered, in a shallow, microwave-safe baking dish or container with ¼ cup of water, until cooked through, and then mash the squash in a bowl.
Preheat the oven to 375 degrees. Coat a baking sheet with cooking spray. Coat a 2 ½- to 3-quart baking dish with cooking spray.
Place the squash on the baking sheet and roast in the oven until tender, about 20-30 minutes. Meanwhile, bring a large pot of water to boil over high heat. Add 1/8 teaspoon of the salt. After the squash has been roasting for about 10 minutes, cook the pasta according to the package directions. Drain the pasta and return to pot. Remove the squash from the oven, and transfer to a large bowl and mash.
In a medium-sized saucepan, whisk together the milk, flour, garlic, remaining salt, and pepper. Bring to a boil over medium-high heat, whisking frequently. Reduce heat to low and simmer, stirring often, until thickened, about 2 minutes. Remove from heat; stir in the mashed squash and 2 ½ teaspoons of thyme. Add the sauce to the pasta, and toss.
Transfer the pasta mixture to the baking dish and dot with spoonfuls of ricotta. Sprinkle with parmesan and walnuts, and bake in the oven until top is lightly browned in a few spots, about 15-20 minutes. Remove from the oven and sprinkle with the remaining thyme.