Preheat the oven to 325 degrees F (165 degrees C).
Place bread cubes in a single layer on a rimmed baking sheet.
Bake in the preheated oven for 10 to 12 minutes, stirring halfway through.
Remove from the oven and let cool. Increase oven temperature to 350 degrees F (175 degrees C). Lightly grease a 9x13-inch baking dish.
Melt butter in a large skillet over medium-high heat. Add onion and celery and cook, stirring often, until onion is translucent and beginning to brown, about 7 minutes. Stir in salt, poultry seasoning, and pepper and remove from the heat.
Whisk together stock, eggs, parsley, and rosemary in a large bowl. Add cooled bread cubes and onion mixture; stir until very well combined. Pour mixture into the prepared baking dish and cover with foil.
Bake for 45 minutes. Uncover and bake until golden brown and lightly toasted on top, 20 to 25 more minutes.