Preheat the oven to 350°F (175°C).
In a large pot, bring salted water to a boil and cook the ziti according to package instructions until al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the ground beef and Italian sausage. Cook until browned, breaking it up with a spoon.
Add the chopped onion and minced garlic to the skillet. Cook until the onion is translucent, about 5 minutes.
Stir in the crushed tomatoes, tomato sauce, dried basil, oregano, salt, and pepper. Simmer for about 10 minutes.
In a mixing bowl, combine ricotta cheese, egg, salt, and pepper. Mix until well blended.
In the baking dish, start layering: spread half of the meat sauce on the bottom, then half of the cooked ziti, dollops of the ricotta mixture, and half of the mozzarella cheese. Repeat the layers.
Finish with the remaining meat sauce and top with the remaining mozzarella and Parmesan cheese.
Cover the baking dish with aluminum foil and bake in the preheated oven for 30 minutes.
Remove the foil and bake for an additional 15 minutes, until the cheese is bubbly and golden.
Allow the baked ziti to cool for a few minutes. Garnish with fresh basil if desired and serve.