Heat the oven to 350°. Oil an 8-by-8-inch baking dish.
In a large pot of boiling, salted water, cook the pasta for 7 minutes. It will be partially cooked. Drain. Rinse with cold water and drain again thoroughly.
In a medium saucepan, heat 1 1/2 tablespoons of the oil over moderately low heat. Add the onion and cook, stirring occasionally, until translucent, about 5 minutes. Add the garlic and cook, stirring, for 30 seconds. Add the tomatoes, salt, and bay leaf. Bring to a simmer over moderate heat and cook until very thick, about 10 minutes. Stir in 1/4 teaspoon of the pepper. Remove the bay leaf.
In a small bowl, combine the ricotta, 1 cup of the mozzarella, about half the Parmesan, the pesto, and the remaining 1/4 teaspoon pepper.
Put half of the cooked pasta into the prepared baking dish and top with about a third of the tomato sauce. Spread the ricotta mixture on the sauce in an even layer. Cover with the remaining pasta and then the remaining sauce. Top with the remaining 1/2 cup mozzarella and the remaining Parmesan. Drizzle with the remaining 1/2 tablespoon oil. Bake until bubbling, about 30 minutes. Let sit 10 minutes before cutting.
Wine Recommendation: This boldly flavored dish needs a rustic red wine to stand up to it. A Salice Salentino from the south of Italy or a Corbières or Cahors from France will serve well.
This is a delicious, cheesy, and saucy ziti. The combination of three cheeses makes for a very rich ziti and the addition of the pesto adds another flavor dimension and beautiful color. I thought the pasta to sauce and cheese ratio was a little low. Add more pasta if you like a more 50/50 balance. Leave as is if you like a very cheesy dish.
This is good; I liked it a lot because I'm a pesto fan. Hubby did not because pesto is too strong for him. I think if I were to make it again, I would make more red sauce and reduce the pesto mixture by about a third.