For the pesto: In a food processor, combine the pine nuts, lemon juice, garlic, salt, and pepper and pulse until well chopped.
Add the basil and pulse until combined.
With the food processor running, drizzle in the olive oil and pulse until combined. Add the Parmesan cheese, if using, and pulse to briefly combine. For a smoother pesto, add more olive oil.
For the Pasta: Bring a large pot of well-salted water to a boil. Drop the pasta into the water and cook for 1 minute less than package directions.
Reserve 1 1/2 cups of the pasta cooking liquid, then drain. Return the pasta to the pot.
Meanwhile, heat the olive oil in a large skillet over medium-low. Add the garlic and red pepper flakes, cook for about 1 minute or until the garlic is fragrant, then add the tomatoes and cook for about 3 minutes, or until the tomatoes start to soften. Season with salt and pepper.
Increase the heat to medium, add the chickpeas and season with salt and pepper. Cook until they start to soften, about 3 minutes, then mash half of them with the back of a spoon or a potato masher. Give everything another stir, then stir in the red wine vinegar and the pesto. Taste and adjust the seasonings.
Add the chickpea pesto mixture to the pot with with pasta, along with 1 cup of pasta cooking liquid. Gradually add the Parmesan cheese, stirring constantly and adding more pasta cooking liquid as needed (you may not use the full 1 1/2 cups), until the pasta is cooked through and the sauce is creamy and emulsified, about 2 minutes.
Stir in the butter until it melts. Taste and adjust the seasonings as desired.
Serve in bowls, topped with extra Parmesan cheese and pepper.