Preheat your oven to 400°F and lightly grease a 9x13-inch baking dish.
Bring a large pot of salted water to a boil. Add the penne pasta and cook for about 8 minutes. It should be slightly underdone. Drain well.
While the pasta cooks, heat the olive oil in a large skillet over medium heat. Add the chopped onion and sauté for 3 minutes until soft. Add the lean ground beef and cook until browned, about 8–10 minutes. Stir in the minced garlic during the final minute.
Pour in the marinara sauce and season with salt and pepper. Let the mixture simmer for 3 minutes to blend the flavors. Mix in the Parmesan cheese and red pepper flakes.
In the prepared baking dish, mix the drained pasta with the beef and sauce mixture. Spread evenly and top with the shredded cheddar cheese.
Bake uncovered in the preheated oven for 10–15 minutes, or until the cheese is melted and bubbly. To brown the cheese, optionally broil the casserole for the last couple of minutes of baking. Allow to cool slightly before serving.
Plate your casserole while hot. Garnish with fresh basil. Consider serving with a fresh side salad to complete a balanced meal.