Hard to tell cause looking at the outside only.
Burned up has multiple causes especially in this case. Not sure why Megger readings matter. It will be 0 (shorted).
Well pump motors are water cooled. If it plugs up, it burns up. There should be openings...ports for water. There is supposed to be a thermal switch internally. An overload relay is utterly useless on these. You wire the switch up instead of the overload relay. So far sounds like installation error right there. Unlike air cooled motors you simply cannot rely on an overload relay (“heater”) to protect submersible motors.
Remove rotor and look inside. Based on appearance of the stator and rotor you can immediately identify single phasing, manufacturer defect, overload, surged, etc., although so far it looks like overload. Some faults such as broken rotor bars or eccentric air gap or bad bearing also look like overload. Check bearings (should be obvious). Check core loss/growler test. Check for full of mud/sand which is sort of unavoidable in a new well (expect failures) and indicates the screen on the well point failed in old ones. But don’t bother doing it yourself...
Or...most motor shops charge very little for disassembly/diagnosis. This motor is big enough that rewinding will be cheaper than new. All shops are going to send it to usually Texas for rewinding. The stator is very long and narrow on these. It requires a special winding machine very few shops have. So I’d encourage you to just take it to a reputable motor shop for diagnosis and rewinding.
Also there is often a moisture probe. It is just two contacts located between the inner and outer seals. It typically ohms around 100k. It should trigger an alarm/shutdown at under 10-30k. At that point the motor is fine, just needs new desks installed. The moisture relays also monitor and trigger on thermal switches. On some motors they series these together so “open” (megaohms) is overload, under 10k is moisture alarm/shutdown, everything else is good. Macromatic makes a good inexpensive moisture/overload relay.
As to which shops look for third party inspection. The shop should be either EASA or ISO 9000. UL stamps would be a definite second inspection. Also look at the voltages and sizes. Walk away from shops that don’t do over 500 HP themselves and don’t do 4160 themselves. It doesn’t matter if you have equipment in those ranges or not. It takes extra quality to handle large and higher voltage motors that a local shop just does not have. A clean room winding shop is necessary above 10 kV but that’s pretty rare so don’t get concerned about that. Also they need to test run EVERY motor. Look for a test stand and reports.
This motor is rebuildable if not damaged beyond repair. It will not just save you money. Motor shops use better wiring than factory original. They tend to use higher quality construction techniques because the techniques are different (one at a time, hand built, not assembly line). The same shoo can/should rebuild the well pump too. Often pumps destroy motors when they have bad bearings, worn out impellers, casing holes, etc.