Preheat oven to 375F and move the rack to the top third of the oven.
Boil a salted pot of water for the pasta. Cook it for 2 minutes less than the package directions indicate. Once it's done, drain it and add it to a 9x13 casserole/baking dish.
Meanwhile, add the beef, onion, oregano, and red pepper flakes to a skillet. There should be enough fat released by the beef to cook the onion, but if it's particularly lean, add a tablespoon of olive oil. Cook over medium-high heat, stirring occasionally, until the meat has browned/cooked through (about 10 minutes). If there's a lot of excess fat, spoon most of it out.
To the skillet, stir in the garlic and cook for about a minute, then add in the marinara sauce and cook for a few more minutes until it's warmed through. I stir in some salt & pepper as well.
Pour the beef mixture over top of the spaghetti. Toss until everything is coated. Smooth it out into an even layer.
Top with the cheeses and bake, uncovered, for 20 minutes. Broil for a few minutes to brown the cheese if you want (watch it carefully). Let it sit for 5-10 minutes, then serve by cutting it into squares using a spatula. I garnished it with some chopped parsley, but that's totally optional.