Set oven to 425 degrees. Heat 2 tablespoons olive oil in a pan over medium heat. Add leek and garlic and cook until tender, about 4 minutes. Increase heat to medium-high, add mushrooms, and cook about 2 minutes more. Season with salt. Place pitas on a parchment-lined baking sheet. Spread each with 2 tablespoons ricotta, drizzle with olive oil, and top with vegetables. Bake until the pita is golden and cheese begins to melt, 6 to 8 minutes. Season with red-pepper flakes.