Preheat the oven to 350 degrees.
Place the bread in a single layer on a sheet pan and bake for 20 minutes, tossing once, until lightly browned. Set aside.
Meanwhile, heat the butter in a large (12-inch) sauté pan over medium-low heat.
Add the pancetta, raise the heat to medium, and cook for 5 minutes, until browned.
Stir in the onions, celery, and apple and cook over medium to medium-high heat for 8 to 10 minutes, stirring occasionally, until the vegetables are tender.
Stir in the sherry, rosemary, 1 tablespoon salt, and 1½ teaspoons pepper and cook over medium heat for 5 minutes, until most of the liquid is gone.
Off the heat, stir in the parsley.
Meanwhile, whisk the eggs, cream, chicken stock, and 1½ cups of the Gruyère in a very large bowl.
Stir in the bread and the vegetable mixture and set aside for 30 minutes to allow the bread to soak up the custard.
Pour into a 9 × 13 × 2-inch oven-to-table baking dish.
Sprinkle with the remaining ½ cup of Gruyère and bake for 50 to 60 minutes, until the top is browned and a knife inserted into the middle comes out clean.
Serve hot.
