Preheat your oven to 375°F (190°C).
In a large pot, bring salted water to a boil. Add the ziti pasta and cook according to package instructions until al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the chopped onion and cook until softened, about 4-5 minutes. Stir in the minced garlic and cook for an additional minute.
Add the ground beef to the skillet, breaking it apart with a spoon. Cook until browned and fully cooked, approximately 6-7 minutes. Drain excess fat if necessary.
Stir in the marinara sauce, Italian seasoning, salt, and black pepper. Bring to a simmer, then remove from heat.
In a large mixing bowl, combine the cooked ziti, ricotta cheese, half of the mozzarella cheese, and half of the Parmesan cheese. Mix well until combined.
In a baking dish, spread half of the meat sauce on the bottom. Layer the ziti mixture evenly on top. Pour the remaining meat sauce over the ziti and sprinkle with the remaining mozzarella and Parmesan cheese.
Cover the baking dish with aluminum foil and bake in the preheated oven for 25 minutes.
Remove the foil and bake for an additional 15 minutes, or until the cheese is bubbly and golden brown.
Remove from the oven and let it rest for about 5 minutes. Garnish with fresh basil if desired. Serve hot.