Preheat your oven to 375°F (190°C) and lightly grease a baking dish
Heat olive oil in a large skillet over medium heat
Add diced onion and cook until soft and translucent
Stir in minced garlic and sauté for 30–40 seconds until fragrant
Add ground beef or sausage and break it apart while cooking
Cook until fully browned and no pink remains
Drain excess grease to avoid an oily casserole
Add mushrooms and bell peppers to the skillet
Cook for 3–4 minutes until slightly softened but still firm
Pour in marinara or pizza sauce and stir well
Add Italian seasoning, salt, pepper, and chili flakes
Let the mixture simmer for 3–5 minutes to develop flavor
Remove from heat and allow it to cool slightly
Transfer the mixture into the greased baking dish
Spread evenly to create the base layer
Sprinkle half of the mozzarella cheese over the mixture
Add a layer of pepperoni slices evenly across the top
Sprinkle remaining mozzarella cheese and Parmesan cheese
Place the dish in the oven and bake for 20–25 minutes
Bake until cheese is melted, bubbly, and lightly golden
Switch to broil for 2–3 minutes for a crispy cheesy top
Remove from oven and let rest for 5 minutes before serving
Slice and serve warm