Boil the pasta. Cook in well-salted water until just shy of al dente (1–2 minutes less than package). Drain and set aside.
Sauté the aromatics. Warm olive oil in a large skillet over medium heat. Add onion with a pinch of salt and cook until soft, about 5 minutes.
Stir in garlic for 30 seconds.
Brown the beef. Add ground beef, breaking it up. Season with salt, pepper, Italian seasoning, and red pepper flakes. Cook until no pink remains and most moisture cooks off.
Add marinara. Pour in the sauce and simmer 3–5 minutes to meld flavors.
Taste and adjust seasoning.
Preheat the oven. Set to 375°F (190°C). Grease a 9x13-inch baking dish.
Combine. In a large bowl, toss the cooked pasta with the beef marinara. Fold in ricotta, half the mozzarella, and half the Parmesan.
Mix gently so you keep some pockets of cheese.
Assemble. Transfer to the baking dish. Top with remaining mozzarella and Parmesan.
Bake. Bake uncovered for 18–22 minutes, until the cheese is melted and the edges are bubbling.
Broil (optional). For extra color, broil 1–2 minutes until the top turns golden. Watch closely.
Rest and serve. Let sit 5–10 minutes.
Finish with chopped basil or parsley and serve hot.