Cream cheese is the secret to the silky sauce in this vegetarian baked pasta dish, while mozzarella and Parmesan create a golden bubbling crust on top.
Preheat oven to 450 degrees. Place tomatoes in a food processor and puree until smooth.
In a medium saucepan, heat oil over medium-high. Add garlic and red-pepper flakes, and cook until golden and fragrant, 1 to 2 minutes. Add pureed tomatoes. Bring to a boil over high, then reduce heat to medium and cook at a rapid simmer, stirring occasionally, until thickened slightly, about 30 minutes.
Meanwhile, in a pot of generously salted boiling water, cook pasta 4 minutes less than according to package instructions (about 6 minutes total). Drain into a colander and rinse under cold water until cool, then drain again. Transfer to a large bowl.
Stir cream cheese into sauce until melted, then remove from heat. Season with salt and pepper.
Pour 1 cup sauce into a 9-by-13-inch baking dish; spread into an even layer. Scatter half of mozzarella over sauce. Add 3 cups sauce and 1/2 cup Parmesan to bowl of pasta; toss to coat. Add pasta mixture to the baking dish in an even layer. Top with remaining sauce; sprinkle with remaining mozzarella and Parmesan.
Bake on a rack in the top third position until cheese is melted, 10 minutes. Switch oven to broiler setting; broil until cheese is bubbly and browned in places, about 3 minutes more. Let cool 10 minutes; serve.