I start by heating my oven to 375 °F (190 °C) and moving the oven rack to the top third. Meanwhile, I boil salted water and cook the penne just 2 minutes less than the package recommends, so it stays slightly al dente.
Once drained, I return the pasta to the pot and stir in the marinara sauce plus about one-third of the pepperoni slices. This ensures pepperoni flavor throughout, not just on top.
I spread that mixture evenly into my casserole dish. Then I sprinkle mozzarella across the top, and arrange the remaining pepperoni slices over the cheese.
I bake uncovered for 20 minutes, letting the cheese melt and the dish warm through. Then I turn on the broiler for a few minutes (watching carefully) so the pepperoni crisps and the cheese gets golden.