Add olive oil to the pot, increase the heat to medium-high, and add the onion. Cook, stirring frequently, until fragrant and beginning to soften, about 2 minutes.
Add the carrot and celery and cook, stirring frequently, until they begin to soften and brown, about 2 minutes more. Be sure to scrape any brown bits from the bottom of the pan.
Stir in the garlic, pepper flakes, salt & black pepper and cook, stirring, until the garlic is fragrant, about 1 minute more.
Add the chicken broth, tomatoes and bring to a boil over high heat.
When the broth reaches a boil, reduce the heat to medium, add HALF of the beans.
Mash the remaining beans with a fork or wooden spoon and add them to the pot, stirring to distribute.
Stir in the optional escarole, adjust the heat as necessary to maintain a gentle simmer, and simmer until the escarole is tender, 15 to 20 minutes. (I cover the pot loosely during this step to prevent too much reduction in the broth.).
Meanwhile cook the pasta to al dente.
Stir in the cooked pasta just before serving. Note that the pasta will absorb a lot of the broth.