Preheat the oven to 350°. On a large rimmed baking sheet, toss the squash and onion with 1 tablespoon of the oil; season with salt and pepper and spread in a single layer. Drizzle 2 tablespoons of the oil on another large rimmed baking sheet; add the tomato halves and garlic and roll to coat with oil. Season the tomatoes with salt and pepper and turn them cut side down.
Transfer both sheets to the oven. Roast for about 40 minutes, until tender. Using tongs, transfer the garlic to a bowl; continue roasting the tomatoes for about 20 minutes longer, until very soft. Roast the squash and onion for about 45 minutes total, until tender and golden brown. Cut the squash into bite-size pieces. Discard the tomato skins and coarsely chop the flesh. Squeeze the garlic out of the skins.
In a pot of boiling salted water, cook the pasta until al dente. Drain, reserving 1/2 cup of the water. Return the pasta to the pot.
Meanwhile, in a skillet, heat the remaining 1 tablespoon of oil. Add the pine nuts and toast over moderate heat until golden. Add the crushed red pepper and olives and cook for 1 minute. Add the vegetables and stir over moderately high heat until heated through, about 2 minutes. Season with salt and pepper and scrape into the pasta; add the reserved cooking water, basil and parsley and toss. Serve the pasta in bowls, topping each with 1/2 tablespoon of the pecorino.