Preheat oven to 375°F. Spray a 9x13-inch baking dish with nonstick cooking spray and set aside.
Bring a large pot of salted water to a boil. Cook penne pasta for 1-2 minutes less than the package directions (al dente). Drain well and set aside.
In a large skillet over medium-high heat, combine the ground beef, Italian sausage, and diced onion. Cook, breaking up the meat, until browned and fully cooked through, about 8-10 minutes. Drain excess grease.
Return the skillet to medium heat. Add the minced garlic, Italian seasoning, garlic powder, black pepper, and 2 tablespoons of tomato paste. Stir and cook for 1 minute until fragrant.
Pour in the entire jar of marinara sauce. Stir until fully combined and let simmer on low for 5 minutes.
Add the drained pasta to the meat sauce and toss until every piece of pasta is thoroughly coated.
Pour the pasta mixture into the prepared baking dish and spread evenly. Arrange the pepperoni slices in a single layer over the top.
Sprinkle 2 cups of the mozzarella cheese evenly over the pepperoni, followed by the Parmesan. Add red pepper flakes if using.
Cover tightly with foil (spray the inside of the foil with nonstick spray to prevent sticking). Bake for 20 minutes.
Remove foil and bake for an additional 15 minutes, until cheese is fully melted and bubbly. For extra browning, broil on high for 2-3 minutes — watch it closely!
Remove from oven and let rest for 5 minutes before serving.