My personal experience is A LONG TIME.
I took some .450 Adams rounds apart, which we could tell from the case design were loaded not later than 1877. The primers were long dead and had "bloomed" with corrosion, fusing to the cases, but the powder and bullets were reloaded into new brass with new primers and worked perfectly.
A few years ago I bought an Allen Patent pepperbox, made in the 1850s, and long ago relegated to wall hanger status, the hammer and nipples purposely broken to make it unusable (who knows when, but maybe 100 years?). I found that it was loaded. I pulled the balls and found the chambers that had a decent patched seal, despite the absense of caps and broken off nipples had compacted powder that once picked out, burned readily.
Since we're all using "new" primers today, a chemistry fixed with the non-corrosive recipe of the 1950s, and since these have shown almost ZERO deterioration if well stored over the last 50+ years, I'd hazard to guess the common BP loads we make today will be viable well into the 22nd century if kept from dampness that would eventually eat up the brass. Some day folks will find this stuff in our attics or other dry storage places and it'll work just fine.