Hi,
What I understand from the history is you have weak muscles of the foot. This is one of the reason you are getting pain again and again. Also when you buy the shoe next time make it assure it is 360° flexible, because that is how the shoe should be selected. 
I don't know if the podiatrist have given some insights in buying the shoe. Let's come to the pain in the thigh. this pain is due to excessive load happened on the muscle while performing the Physical activity.
As it's a 
central nervous system who decides where to put weight and where to not. So by default the weight is transferred more on the other side of the leg. This is just time being and it's called DOMS (Delayed onset muscle soreness) which will be alright in 2-3 days of time.
Coming back to your actual problem. Pain in foot. I think there is 
muscle weakness which needs a correction now. I will advice you few exercise and I hope it should work well with you. Since the same I have been trying with people having 
calcaneal spur, 
plantar fasciitis, etc. and it has done well and from the last 12 years I been working on with different patients for similar complaints.
Keep your feet in the room temperature water. Use some pellets or some marbles inside the water. try to grip them and remove it out of the water with the toes. Next try walking bare feet on the ground. Forward and reverse both. but do slow walking.
I think this will help you to regain the strength in the muscles of the foot. As they are too small muscles it will be difficult to achieve earlier results but for sure you will achieve one.
Hope I have answered your query. Let me know if I can assist you further.
Regards,
Jay Indravadan Patel,
Physical Therapist or Physiotherapist