Preheat oven to 350°F. Cook pasta shells in a large pot of salted boiling water according to package instructions for al dente. Drain the shells in a colander and rinse under cold water.
Meanwhile, brown ground beef and onion in a large skillet over medium-high heat. Drain off fat; let cool slightly before adding to the filling.
Combine 1 ½ cups of the shredded Italian blend cheese, all of the ricotta cheese, all of the Parmesan cheese, the egg, the pesto, and half of the beef and onion mixture in a large bowl. Set aside.
Spread ¾ cup of the marinara sauce in the bottom of a 13 x 9-inch baking dish. In a bowl, stir together the remaining marinara sauce and the remaining half of the beef and onion mixture. Set aside.
Fill the cooked, cooled pasta shells with the ricotta mixture. Arrange the shells in the baking dish.
Top the shells with the marinara sauce mixture.
Sprinkle the remaining ½ cup of Italian cheese blend over top.
Cover the dish with foil. Bake for 30 minutes. Remove the cover and bake for 10 more minutes. Garnish with fresh parsley or basil, if desired. Serve!