This is a little bit hypothetical question… Let's assume I finished my PhD in math in my country but I am dissatisfied with it (assume I live in a developing country). Also I have enough money and time. Can I apply for a similar PhD program in an another country? Is it theoretically possible?
If you want to obtain a PhD from a 1st world country I think your best bet is to go to another country as soon as possible. It will be a lot easier to get into a PhD program with a masters degree from a similar country, and it will be easier to continue your career abroad if you have followed a funded PhD program (as opposed to paying yourself / getting a grant from your home country).