Cook the onion in a large knob of butter until completely soft. Add the pancetta and cook until starting to go golden. Add the rosemary and cook for a minute or two. Cool a little, then tip the onion mix into the bread and add the lemon and egg. Stir thoroughly and season well, then tip into a buttered baking dish.