1. Soak the beans in cold water to cover overnight. Drain.
2. Heat 2 tbsp oil in a saucepan over medium-low heat. Add the onions and cook, stirring, for 8 minutes, until translucent. Add the garlic and cook for 1 minute.
3. Add the drained beans, stock, celery, parsley, and bay leaf. Bring to a boil over high heat. Cover and simmer about 1½ hours, stirring, or until the beans are very tender. Stir in the lemon juice.
4. Remove the bay leaf. In batches, with the lid ajar, purèe the soup in a blender. Return to the pan and season. Keep warm.
5. Heat the remaining 1 tbsp oil in a small frying pan over medium heat. Add the pancetta (if using) and cook, stirring, 5 minutes, until browned. Stir in the shallots and cook 3 minutes, until softened.
6. Trim off any rind from and dice the cheese. Stir into the soup. Ladle into bowls, and sprinkle with the pancetta mixture. Serve hot.