Heat the oil in a large soup pot over medium-high heat. Add the pancetta or bacon and cook until just brown, about 5 minutes. Transfer the pancetta to a plate with a slotted spoon and set aside.
Pour out all but 1 tablespoon cooking fat. Add the onion and cook, stirring occasionally, until soft and translucent, about 7 minutes.
Add the celery, garlic, red pepper, salt and pepper and cook for another 3 minutes.
Add the escarole to the pot in batches and cook until just wilted about 2 minutes.
If using homemade beans, pour the reserved bean cooking liquid into a large measuring cup and add enough stock to make 4 cups. If using canned beans, drain, rinse and use only stock.
Add the beans and the liquid to the pot.
When all the escarole is wilted, add the drained beans.
Bring to a simmer and cook, partially covered, until thickened slightly, about 20 minutes.
Stir in the reserved pancetta and adjust seasonings.
Serve in large bowls with a drizzle of good quality olive oil and grated cheese.
