Meanwhile, preheat oven to 425 degrees F. Coat a 9-by-13-inch baking dish with cooking spray.
Toss bread with oil and pepper on a large-rimmed baking sheet. Bake, stirring once, until crispy, about 15 minutes.
Add to the bowl with the onions.
Reduce oven temperature to 400 degrees.
Heat butter in the skillet over medium-high heat. Add celery and diced onion; cook, stirring, until the onion starts to brown, 6 to 8 minutes.
Add apples, sage, thyme and salt. Reduce heat to medium and cook, stirring occasionally, until the apples start to soften, about 5 minutes.
Transfer to the bowl with the onions and bread. Add broth and gently stir until well combined. Transfer to the prepared baking dish.
Cover with foil. Bake for 20 minutes. Uncover and continue baking until the top is crispy, about 15 minutes more.