Hello and welcome to the forums
All of the big brands - Ricoh / Pentax, Nikon, Canon, Sony, Panasonic, FujiFilm, Olympus - have been hit by industry down-turns, extraordinary losses or other financial impediments at some point in very recent history. I think it's highly unlikely that any of them will pull out of the enthusiast and/or pro camera markets soon, but there are no guarantees.
Pentax is as safe as any of those other brands, and arguably safer than some in that list. The photography part of Ricoh Imaging - the division responsible for Pentax cameras and lenses - is doing pretty well, all things considered, with a number of fairly recent and seemingly rather successful products already released, and others on the way. Plus, there are so many lenses and accessories available from stock that it's very unlikely you'd be stuck for equipment if the worst did happen.
Honestly, though, I don't think you have anything to worry about...