Preheat the oven to 375°F (190°C). Grease a large baking dish with cooking spray.
Cook the jumbo pasta shells according to package instructions. Drain and set aside to cool.
In a large skillet, cook the ground beef over medium heat until browned. Drain excess fat.
Add the chopped onion and minced garlic to the skillet and sauté until softened.
Stir in Italian seasoning, salt, and black pepper. Remove from heat and let cool slightly.
In a mixing bowl, combine ricotta cheese, egg, Parmesan cheese, and half of the shredded mozzarella.
Add the cooked beef mixture to the ricotta mixture and stir until well combined.
Spread half of the marinara sauce on the bottom of the prepared baking dish.
Stuff each shell with the beef and cheese mixture, then arrange in the baking dish.
Top the stuffed shells with the remaining marinara sauce and sprinkle with the remaining mozzarella cheese.
Cover with foil and bake for 25 minutes. Remove foil and bake for another 10 minutes, until cheese is bubbly.
Garnish with fresh basil if desired and serve warm.