Whole-grain spaghetti gets striking color from a quick toss with pureed beets. Sun-dried tomatoes lend the sauce a caramelized sweetness.
Preheat oven to 425 degrees. Drizzle beets with oil and season with salt. Wrap tightly in foil and roast until tender, 1 hour. Peel and chop once cool.
Pulse beets, walnuts, and tomatoes in a food processor. Season with salt and red-pepper flakes.
Cook pasta in salted water according to package directions. Drain, reserving 1 cup water, and return to pot.
Toss with beet mixture, adding pasta water until creamy. Serve with ricotta, a drizzle of oil, and red-pepper flakes.