Preheat oven to 425 degrees. Prepare a large baking sheet with nonstick cooking spray.
Cut the top off of the garlic (cutting about 1/4 of the way into the garlic so that you can see most of the cloves inside), drizzle with olive oil, salt, and pepper, and wrap in tinfoil. Place in the oven as it's preheating.
Place all cut veggies onto the baking sheet and mix with olive oil, salt, pepper, and Italian seasoning.
Once the oven is preheated and the garlic has been cooking for about 10 minutes, place the rest of the veggies in the oven and bake for 30 minutes.
While the veggies and garlic roast, cook the pasta according to the package directions.
After 30 minutes of roasting, check to see that the carrots are fork-tender and the onions are cooked. If they are not fully tender, place them back into the oven for about 5 more minutes.
Unwrap the garlic from the tinfoil and squeeze it out of its skin. Add the roasted veggies into a blender along with the inside of the garlic.
Blend for 1-2 minutes until smooth. Do not place an airtight cover on the blender. Instead, lightly cover with a towel to prevent pressure build-up. Taste and adjust the seasoning with salt and pepper.
Add the sauce to the pasta. Top with parmesan cheese if desired!