Cook the ziti pasta according to package directions until al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the chopped onion and sauté until translucent, about 3-4 minutes.
Add the minced garlic and ground meat to the skillet. Cook until the meat is browned and cooked through, breaking it apart with a spatula. Season with Italian seasoning, salt, and pepper.
Stir in the marinara sauce and simmer for about 5 minutes. Remove from heat.
In a separate bowl, mix the ricotta cheese, egg, a pinch of salt, and half of the grated Parmesan cheese until well combined.
In a large mixing bowl, combine the cooked ziti pasta with the meat sauce and the ricotta mixture. Stir until everything is evenly coated.
Transfer the mixture into a greased 9x13 inch baking dish.
Sprinkle the top with shredded mozzarella and the remaining Parmesan cheese evenly.
Cover the dish with aluminum foil and bake for 20 minutes. Remove the foil and bake for an additional 15-20 minutes or until the cheese is bubbly and golden brown.
Once baked, remove from the oven and let it sit for 5-10 minutes before serving.