Cook the ziti pasta according to the package directions until al dente. Drain and set aside.
In a large skillet over medium heat, add ground beef, diced onion, and minced garlic. Cook until the beef is browned and the onion is translucent, about 5-7 minutes.
Stir in the crushed tomatoes, marinara sauce, Italian seasoning, red pepper flakes, salt, and pepper. Simmer for about 10 minutes to let the flavors meld.
In a large bowl, combine the cooked ziti, beef mixture, and ricotta cheese. Mix well until the pasta is fully coated.
In a greased 9x13 inch baking dish, spread half of the pasta mixture evenly. Sprinkle one cup of mozzarella cheese over the layer.
Add the remaining pasta mixture on top, then finish with the remaining mozzarella cheese and all the grated 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-20 minutes, or until the cheese is bubbly and golden brown.
Once done, let it cool for 5 minutes before slicing. Garnish with fresh basil if desired.