Preheat your oven to 375°F (190°C). Grease a 9x13 inch baking dish.
Cook pasta in salted water until al dente (about 2 minutes less than package directions). The pasta will continue cooking in the oven, so slightly underdone is perfect.
While pasta cooks, brown sausage in a large skillet over medium heat, breaking it into small pieces (about 8-10 minutes). Remove excess fat if desired.
Add onions and garlic to the sausage. Cook until onions are translucent (about 5 minutes). If using optional vegetables, add them now.
Stir in marinara sauce and half the pepperoni (chopped). Simmer for 5 minutes.
Combine the pasta and sauce mixture in the baking dish. Mix in 1 cup mozzarella and ½ cup parmesan.
Top with remaining cheese and arrange remaining pepperoni slices on top.
Bake for 25-30 minutes until bubbly and cheese is golden brown.