Preheat your oven to 350°F (175°C).
In a large pot, bring water to a boil and cook the penne pasta according to package instructions until al dente. Drain and set aside.
In a large skillet over medium heat, cook the ground beef and Italian sausage until browned, breaking them apart with a spoon. Drain excess grease.
Add the diced pepperoni and diced ham to the skillet, mixing well.
Stir in the marinara sauce, dried oregano, garlic powder, onion powder, salt, and pepper. Allow the mixture to simmer for about 5 minutes.
In a large mixing bowl, combine the cooked pasta with the meat and sauce mixture, mixing until well coated.
Transfer half of the pasta mixture into a greased 9x13 inch baking dish. Sprinkle half of the mozzarella and cheddar cheese over the top.
Layer the remaining pasta mixture over the cheese, then top with the remaining mozzarella and cheddar cheese.
Cover the baking dish with aluminum foil and bake for 20 minutes.
Remove the foil and bake for an additional 10 minutes, or until the cheese is bubbly and lightly golden.
Let the casserole cool for a few minutes. Garnish with fresh basil leaves if desired before serving.