Adjust an oven rack to the upper position and preheat the oven to 450°F. Place a large (15-inch) ovenproof cast iron skillet on the upper rack.
In a medium bowl, whisk together the chickpea flour and 1 teaspoon salt until incorporated. While whisking, slowly pour in 1 cup lukewarm water (Test it on your forearm. It should feel slightly warm on your skin.) Whisk until the liquid is absorbed and the batter is smooth. Let sit until the oven is hot, then stir 3 tablespoons pesto into the batter until smooth.
Remove the hot skillet from the oven and pour in 2 tablespoons oil. Swirl around to coat the skillet well. Pour in the batter and shake the pan so it forms an even layer. Scatter the shallot and sun-dried tomatoes over the surface.
Bake the chickpea pancake for 15 to 20 minutes until firmly set and crispy around the edges.
Meanwhile, in a medium bowl, toss together the arugula, radicchio, olives, 1 tablespoon oil, and lemon juice until well combined. Season generously with salt.
Remove the socca from the oven and dot with the remaining pesto and ricotta (if using). Then top with the salad. Enjoy immediately with extra pesto on the side.