I have chronic right side chest pain that is relieved with belching. I've taken Prilosec and Nexium (esomeprazole) and I still have this issue. What could this be?

Several things. Pain along the rib margin on the right side may be associated with gallbladder disease, peptic ulcer disease. You mention "chronic" so this must be going on for awhile. It is best to check with your doctor.
Gas. You are probably an air swallower and build up air bubbles which distend stomach and esophagus and cause the pain which is relieved by belching.L you can pay attention to how you swallow and take simethicone four times a day which will help minimize gas bubble size.