I don’t keep jams in the fridge. They are called “preserves” for a reason…! As @marinelife said, I’d agree that it’s likely that the cookies will go stale before you have any problems with the jam. If they are good cookies, I am sure they will have been eaten before that time comes. :)
I’ve had one experience with a jar of jam going off, and as @SebastianUllmark said, it was probably because the sugar content wasn’t high enough, or the jar hadn’t been sterilised properly. I just picked out the mouldy bit and ate the rest.
As @SmashTheState said, I think people could be quite a lot more relaxed about food contamination and storage before it became a problem. I am of the belief that people rely far too heavily on external instruction (e.g., guidelines, sell-by-dates, etc), rather than their own instincts and common sense about these sorts of issues. The human race thrived for thousands of years before anyone invented fridges, and whilst undoubtedly, people are living longer than they used to (for a huge variety of reasons), people can be unduly paranoid about food safety as a result of the messages that people selling food, or food-related products (hmm..vested interests?!) give them. I’m not advocating people being cavalier about things that can adversely affect health, but I think it helps if people learn to trust their own judgments a little more.