To avoid overcooking, check the squash's tenderness with a fork after 30-40 minutes of roasting. For undercooking, simply return it to the oven for a few more minutes until the desired texture is achieved.