In a large skillet, heat the olive oil over medium-high heat. Add the chopped onion and minced garlic, sautéing until the onion is translucent and fragrant. Add the ground beef, breaking it up with a wooden spoon, and cook until it's no longer pink. Season with salt and pepper. Turn off the heat and drain any excess fat.
While the beef is cooking, bring a large pot of water to a boil. Add a generous pinch of salt and the pasta. Cook according to the package instructions until al dente. Drain the pasta in a colander and set it aside for later use.
Preheat your oven to 350°F (175°C). In the same skillet with the browned beef, pour in the tomato sauce. Add the cooked pasta, Italian seasoning, and half of the mozzarella and parmesan cheeses. Stir well to combine everything evenly.
Transfer the beef and pasta mixture to a casserole dish. Spread it out evenly. Sprinkle the remaining mozzarella and parmesan cheeses over the top, creating a cheesy, golden crust that will form during baking.
Place the casserole dish in the preheated oven and bake for about 25–30 minutes, or until the cheese is melted and bubbling with a golden-brown hue. Once done, remove the dish and let it cool slightly before serving.
Notes
For storing, cover with plastic wrap or foil and refrigerate up to 3 days. For freezing, let it cool completely before storing in a freezer-safe container for up to 2 months.