Can anyone tell me what can cause severe pain in both calves that is not relieved by medicine?

Pinched Nerve. It could be you have a pinched nerve in your back. I would suggest seeing a pain/spine specialist to evaluate you further to evaluate what level and what can be done to treat you. There are interventional treatments besides medications and surgeries that might reduce or eliminate the pain altogether.