How to convert 700V AC to 5V DC 500mA?
Is the supply power at a consistent AC frequency?  If so, use a small transformer to take the worst of the bite out of the high voltage.   You need a transformer certified for near the actual voltages you'll encounter, that is also commercially available at sane prices, such as the 575V popular in Canada.    

You need like 3 VA ( not 3 KVA, just 3 VA) so any transformer will do.  

So for instance if you can find a 575V to 48V transformer, that will re-range your voltage to 9-60VAC give or take.

Sorry, didn't realize I essentially duplicated Transistor's comment, but I'm saying don't brew your own transformer, buy one that is UL/CSA/CE listed for at least near the high voltage.  

And you really, really want the isolation.  Seriously.  And that's why to  use listed parts on the HV side.