Place a rack in upper third of oven; preheat to 450°. Heat ¼ cup extra-virgin olive oil in a large high-sided ovenproof skillet or large Dutch oven over medium-high. Cook 1 head of garlic (about 12 cloves), cloves separated, thinly sliced, and ¼ tsp. crushed red pepper flakes, stirring often, until garlic is softened and fragrant, about 45 seconds. Add one 6-oz. can tomato paste and cook, stirring constantly, until paste is brick red, about 2 minutes.
Add one 15-oz. can chickpeas, rinsed, 12 oz. ditalini or other small pasta, 2½ tsp. Diamond Crystal or 1½ tsp. Morton kosher salt, and 5 cups water to skillet; stir until combined. Bring to a boil and cook, stirring often, until about half of liquid is absorbed and pasta is barely al dente, about 2 minutes less than package directions (sauce will still be very loose). Stir in 2 oz. Parmesan, finely grated, then crumble in 2 oz. feta (about one ½"-thick slab); stir to distribute. Remove skillet from heat and arrange remaining 12 oz. feta, cut into ½"-thick slabs, in an even layer over pasta. Bake until pasta is tender and liquid is mostly absorbed but still saucy, 8–10 minutes.
Heat broiler. Broil pasta, watching closely, just until feta is browned and charred in spots, about 3 minutes. Top with tender herbs (such as dill, chives, and/or parsley) if desired. Serve with lemon wedges for squeezing over.
