Cook ziti in salted boiling water for 2 to 3 minutes less than the al dente time on the package. Drain and toss with a drizzle of olive oil to prevent sticking.
Heat olive oil in a large skillet over medium-high. Brown the ground beef, breaking it into small pieces, until no pink remains and juices have evaporated, about 6 to 8 minutes. Drain excess fat, leaving about 1 tablespoon. Add onion and cook 3 to 4 minutes. Add garlic and stir 60 seconds.
Add crushed tomatoes, oregano, basil, red pepper flakes, salt, pepper, and sugar. Stir and simmer over low heat for 10 to 12 minutes until slightly thickened. Taste and adjust salt.
In a bowl, stir together ricotta, egg, salt, pepper, and parsley until smooth.
Preheat oven to 190°C (375°F). Spread 1/2 cup of meat sauce across the base of a 9x13 inch baking dish.
Toss the drained pasta with the remaining meat sauce. Spread half in the dish. Drop ricotta mixture in spoonfuls over the pasta. Scatter 1 cup mozzarella and 1/4 cup Parmesan over the ricotta. Add the remaining pasta layer. Top with remaining mozzarella and Parmesan.
Cover tightly with foil and bake 20 minutes. Remove foil and bake 12 to 15 minutes more until cheese is golden and sauce bubbles at the edges. Rest 10 minutes before serving.