I'm changing the oil on my '94 miata.... I'm about to reinstall the oil filter. I reach down, feel the threaded shaft that the oil filter threads onto. and I feel a hex nut. It's loose... very loose
So I unscrew it, This is what it looks like.
I'm guessing this this is supposed to be tightened down at the base of the shaft. Will I cause any great harm if I can't get this tight?

Wish I had some good advice for you but I don't. I have never run across something like that while changing oil.
I think you've got it right, yes it should be tight or the shaft that the filter screws onto could come loose, leading to a bigass oil leak and possibly damaging the threads on the block.
I'm not 100% sure of this but I've seen it on other blocks and it's the exact same setup you'd find on an oil cooler sandwich plate.
Edit: Did some research, Miatas definitely have a removable filter fitting.
Thread the tube in finger tight, run the nut down and torque it. Its a locknut.
I forget if the Miata has an oil cooler, but I believe it does. If so, be careful not to overtighten. You can crush the oil cooler, and cause it to mix the coolant and oil.