Preheat oven to 400 degrees. In a large pot, cook rigatoni according to package directions to al dente. Immediately rinse with cold water to stop the cooking process. Drain and set aside.
In a large heavy saucepan, melt 1/4 cup butter over medium to high heat; add flour and whisk for 1 minute. Gradually whisk in the milk and continue to cook over medium to high heat, stirring constantly, until thickened and bubbly. Stir in the salt, pepper, and 3 cups of the shredded cheese until melted. Stir in the rigatoni.
Spray a 13 x 9-inch baking dish with non-stick cooking spray. Pour in half of the pasta in a single layer. Spoon 1/2 of the marinara sauce carefully over the pasta. Top with 1/2 of the sliced fresh mozzarella and 1/2 of the pepperonis. Repeat layers once ending with pepperonis. Bake for 30-40 minutes or until cheese is golden brown and pasta is bubbling in center. Let stand for 15 minutes before serving. Sprinkle with grated parmesan cheese and red pepper flakes, if desired.