Preheat the oven to 350 degrees F.
For the pizza sauce: Add the olive oil to a 12-inch saute pan over medium heat and, when hot, add the onion. Saute until translucent. Add the garlic and red chile flakes, cook for 1 minute, and then add the canned tomatoes. Reduce the heat to a simmer and cook for 25 minutes, stirring occasionally. When the mixture has thickened, stir in the fresh and dried spices. Simmer for an additional 15 minutes and adjust seasoning, if necessary. Remove from the heat.
For the bottom layer: In a medium bowl, combine the cream cheese, ricotta, Parmesan, egg, garlic and spices. Spread the mixture evenly into an oven-safe casserole (2-quart capacity or a 9-inch pie pan). Set aside.
For the toppings: In a small saute pan over medium heat, add a drizzle of olive oil and the pepperoni. Saute until the pepperoni is just crisp, 4 to 5 minutes, and then drain on a paper towel-lined plate. Add the remaining olive oil and the red bell peppers and saute over medium-high heat until just starting to soften. Add the shallot, cook for 2 minutes, and then add the mushrooms. Cook for 7 to 10 minutes and remove from the heat.
To assemble: Spread the pizza sauce over the top of the bottom layer of cheese, sprinkle with the pepper and mushroom mixture, and then the pepperoni. Evenly distribute the mozzarella over the top and bake for 20 minutes. Remove from the oven and sprinkle with the Parmesan. Garnish with the basil sprig and serve hot with pizza dough strips, toasted pita strips, or crackers.
Recipe courtesy of Guy Fieri