In a deep pot or large saucepan, add the olive oil and place over medium heat. Once hot, add the onion and garlic and cook for 1-2 minutes, until fragrant.
Add the ground sausage, break apart in the pan, and cook until browned. Add the pizza sauce and mix well. Let the mixture simmer for 4-5 minutes. Remove from the heat.
Add the cooked pasta into the sausage sauce mixture and mix until combined. Fold through half the parmesan cheese. Transfer the mixture into the greased baking dish.
Sprinkle with remaining parmesan cheese, mozzarella cheese, then top with pepperoni. Place the dish in the oven and bake until the cheese has melted and the edges are golden.