01 - Preheat oven to 375°F and grease a 9x13 inch baking dish.
02 - Boil ziti pasta in salted water until just al dente, then drain and set aside.
03 - Heat olive oil in a skillet over medium heat. Sauté onion until translucent, about 4 minutes, then add garlic and cook for 1 minute.
04 - Add crushed tomatoes, tomato paste, oregano, basil, salt, black pepper, and red pepper flakes to the skillet. Simmer uncovered for 10 minutes, stirring occasionally.
05 - In a bowl, blend ricotta, Parmesan, egg, and parsley until smooth.
06 - Spread a thin layer of tomato sauce in the baking dish. Layer half the pasta, half the ricotta mixture, half the mozzarella, and more sauce. Repeat layers, topping with extra Parmesan.
07 - Cover with foil and bake for 25 minutes. Remove foil and bake an additional 10 to 15 minutes until cheese is bubbly and golden.
08 - Let rest for 10 minutes before serving to allow flavors to meld and cheese to set.