When I actually studied classical guitar, and played daily, the strings would wear out pretty quickly, mostly due to the wound strings getting dented. But when they sit, they last forever.
My nylon strings lasted forever, too, until I moved to Florida. The constant 100% humidity is death to strings no matter if you use the guitar or not.