Heat oil in a large, heavy saucepan over medium heat until hot but not smoking. Add bacon, and cook, stirring occasionally, until crisp, about 12 minutes. Using a slotted spoon, transfer to a plate.
Add onions and shallot to pan; cook, stirring occasionally, until onions are translucent and soft, about 8 minutes. Add garlic; cook 1 minute more.
Return bacon to pan. Stir in stock, beans, thyme, cayenne, and 1 teaspoon salt; season with pepper. Bring to a boil. Reduce heat; cover, and simmer 30 minutes. Uncover, and cook until beans are tender, about 1 1/2 hours more.
Stir in escarole. Cook 2 minutes. Season with salt and pepper.