Does food get spoilt if it catches moisture?
There's different things here -- loss of texture/freshness (ie, stale), and unsafe to eat (spoiled)

There's lots of things out there that aren't unsafe to eat, but you might not want to -- eg, the brownies that have become so hard that you might be worried about chipping a tooth.

Some things can be saved after they've had issues -- it's possible to reheat corn chips or deep fryer to crisp them back up.  Limp carrots will come back if wrapped in a damp towel and left in your crisper for a day or two.  Limp lettuce might revive in an icewater bath.  Day-old bread (slightly stale, not rock hard) can be put in a dampened paper bag and put in the oven on low heat to revive.

... but all of these assume loss of freshness, not rotted / covered in mold / etc.  If it smells funny, there are bugs crawling all over it, it's now fuzzy, or it's taken on new interesting colors ... it's time for the compost or trash.

Sometimes, slightly less than fresh item are great in other things -- vegetables past their prime can go into making stocks; stale bread for croutons, french toast or bread puddings.