Shimano Deore XT: is 9-speed no longer continued? (Europe)
Shimano has a pretty good track record of wear parts availability for older groupsets. I am using 8-speed myself, and there are several European mail order stores as well as local shops that have spare cassettes and chains.  I would expect that 9-speed spare parts aren't going away either. 

The problem with off-road groups is that rear derailleurs are not compatible between 9- and 10-speed, so you need to change shifters, derailleurs, cassette and chain if you need to switch later.

EDIT: To clarify, even though 9-speed XT groups have not been sold in a while, XT-level 9-speed wear parts are still available. For 8-speed it looks like spares above Deore/Tiagra level are no longer available.