Heat the oven to 400 degrees F. Oil a large baking dish (about 9 by 13 inches).
In a large stainless-steel frying pan, heat the oil over moderately low heat. Add the onion and cook, stirring occasionally, until starting to soften, about 3 minutes. Stir in the ground beef and cook, breaking it up, until the meat is no longer pink, about 2 minutes. Drain off any excess fat.
Add the tomatoes and salt to the pan and bring to a simmer. Cook until most of the liquid evaporates, about 10 minutes. Remove the pan from the heat and stir in the pesto.
Meanwhile, in a large pot of boiling, salted water, cook the shells until just done, about 10 minutes. Drain and toss with the sauce. Put half of the pasta into the prepared baking dish and top with half the mozzarella and 2 tablespoons of the Parmesan. Repeat with the remaining pasta, mozzarella, and Parmesan. Bake until bubbling, about 15 minutes.
Variation--
Almost any relatively soft, mild cheese will taste good here. You might try fontina in place of the mozzarella, or even Gouda or Havarti.