Preheat the oven to 350°F. Spread the bread cubes on a baking sheet and toast for 20 minutes, until crisp and golden. Set aside.
Melt the butter in a large skillet over medium-low heat. Add the pancetta and cook about 5 minutes, until it begins to crisp.
Add the onion, apple, and celery. Cook about 8 minutes, until softened, stirring two or three times.
Stir in the rosemary, salt, and pepper.
Add the sherry and cook 4 to 5 minutes, until most of the liquid has evaporated.
Turn off the heat and stir in the chopped parsley.
In a large bowl, whisk the eggs, chicken broth, heavy cream, and 1 1/2 cups of the Gruyere until combined. Reserve the remaining 1/2 cup of cheese for the top.
Add the toasted bread cubes to the custard, then add everything from the skillet. Stir until every piece of bread is coated.
Cover and let stand 30 minutes so the bread can absorb the custard. Do not skip this step.
Stir once more, working any dried-out pieces from the top back down into the liquid.
Pour into a greased 9x13 baking dish and sprinkle the reserved 1/2 cup of Gruyere over the top.
Bake at 350°F for 45 to 50 minutes, until a knife inserted in the center comes out clean. Convection ovens may finish a few minutes early. Serve hot or warm.