NSAIDs greatly increase your chances of ulcers and gastritis even if you take them on a full stomach.
So it doesn't matter whether you eat with them or not, largely, unless what you're eating with them is an antacid or proton pump inhibitor.
Aspirin inhibits both pathways. Other NSAIDs do the same, although they typically have less of an effect on COX-1.
There is something on the unnoficial market which may inhibit only COX-2, a sort of holy grail in the last few decades of medicine: kratom[0].
Hopefully more research can be done into its constituent chemicals before it is banned in the US. The DEA already tried, and its illegal in several states.