Preheat oven to 375°F (190°C).
Cook pasta according to package instructions until just al dente. Drain and set aside.
In a large skillet, heat olive oil over medium heat. Add onion and garlic, cooking until fragrant.
Add ground beef to the skillet. Cook until browned, breaking it apart with a spoon.
Stir in tomato sauce, diced tomatoes, Italian seasoning, salt, and pepper. Simmer for 10 minutes.
Combine the beef mixture with cooked pasta and half of the cheddar cheese.
Transfer everything into a greased baking dish. Sprinkle with remaining cheddar and mozzarella cheese.
Bake uncovered for 20-25 minutes until cheese is melted and golden on top.
Let cool slightly before serving.