The bread cubes can be toasted up to three days ahead, then stored in an airtight container at room temperature. The dressing itself can be prepared a day ahead and stored in the baking dish, covered, in the refrigerator.
Preheat oven to 375 degrees with racks in upper and lower thirds. Brush a 3-quart baking dish with butter.
Spread bread cubes onto two rimmed baking sheets. Toast in oven until dry and golden in places, 12 to 15 minutes. Let cool completely, then transfer to a large bowl.
Melt butter in a large skillet over medium. Add onion, celery, and garlic; season with salt. Cook, stirring occasionally, until soft, 8 to 10 minutes. Stir in cranberries and rosemary; cook 30 seconds. Add wine and boil until almost evaporated, 3 to 4 minutes.
Transfer onion mixture to bowl with bread. Toss with pecans, parsley, and broth, adding more broth as needed until bread is evenly moistened but not soggy. Fold in eggs; season with salt and pepper. Transfer to prepared baking dish and cover with parchment-lined foil.
Bake in upper third of oven 20 minutes. Uncover and continue baking until crisp on top and browned in places, 20 to 25 minutes more.