Preheat oven to 180 degrees. Grease a baking dish with olive oil.
In a large bowl, combine pasta, ricotta, red chili flakes and Italian seasoning. Season to taste with salt and pepper. Fold in gnocchi (uncooked) and about 1/2 of mozzarella.
Pour sauce and gnocchi mixture into the baking dish. Sprinkle with remaining mozzarella and Parmesan, then place pepperoni on top.
Bake for 20-30 minutes until the cheese is melted and the gnocchi is cooked through.
Let sit for about 10 minutes. Garnish with basil and serve warm.