01 - Preheat oven to 375°F. Grease a 9x13-inch baking dish.
02 - Boil ziti in salted water until slightly less than al dente, about 2 minutes under package instructions. Drain and set aside.
03 - Heat olive oil in a large skillet over medium heat. Add chopped onion and cook until translucent, approximately 5 minutes. Stir in minced garlic and cook for 1 minute.
04 - Add crushed tomatoes, tomato paste, oregano, basil, and red pepper flakes to the skillet. Season with salt and pepper. Simmer for 10 to 15 minutes, stirring occasionally.
05 - In a medium bowl, blend ricotta cheese, egg, Parmesan, and chopped herbs until smooth and uniform.
06 - In the pasta pot, combine drained ziti with half of the tomato sauce and half of the shredded mozzarella cheese. Stir gently to combine.
07 - Spread half of the ziti mixture evenly into the prepared baking dish. Dollop and gently spread the ricotta mixture atop. Add remaining ziti mixture over the ricotta, then pour remaining sauce. Sprinkle with remaining mozzarella cheese.
08 - Cover baking dish with foil and bake for 20 minutes.
09 - Remove foil and bake an additional 10 to 15 minutes until cheese is golden and bubbling.
10 - Allow baked dish to rest for 10 minutes prior to serving.