They are trim pots for OCP, or Over Current Protection, and PFC, or Power Factor Correction.
They are usually used to adjust things at the factory, because a batch of parts like resistors can vary slightly even though they have the same ratings.
Either they werent adjusted right at the factory, or parts may be starting to wear out requiring adjustment.
There are three reasons this can happen.
Fake IC. Either not actually a regulator, or it's specs do not match what you were told.
Damaged IC. Static electricity, Reverse Voltage, or some other reason. Not always visible damage.
Heat. Heat kills. Under-designed applications may not allow full use of a part's specs.
In this case, it seems to be reason 3. A Sot-23 IC with little to no copper pour or external heatsink to keep it within it's allowable junction temperature. If you don't take this into account, then it will fry itself. Some ICs may have over-temperature lockout circuitry, but don't count on it.
Here, the issue is highly susceptible to Voltage and Current concerns, re: Power/Wattage. As a Linear Regulator, the input voltage * input current is wasted in heat. So while it could do higher voltage at a low current, or a high current at a lower voltage, it can't do both.
The application, a ESP8266, will draw up to 400 mA at 3.3V. With a 12V input, that's (12V - 3.3V) * 0.4A = 3.48 Watts. Too much for no heatsinking.
This application really only allows for 5V input. (5V - 3.3V) * 0.4A = 0.68 Watts. Much more manageable.
As OP has shown, 3.48 Watts was enough to UNSOLDER the part from the board. Reverse reflow soldering ha. The first board had physical damage instead.
The Regulator itself would most likely actually be 12V compatible, with careful selection of input voltage and current requirements. If you hold the ESP8266 in reset, and power something small, like a 20mA LED, you will see it working just fine from 12V.
Best Answer
A small AC-DC converter like this is almost likely a flyback topology.
AC-DC converter rated for 120VAC and plugged into 240VAC will not work almost certainly. There should be an overvoltage protection circuit inside. The purpose of this circuit is not to protect the wall wart, but to prevent a fire. It's designed to trip somewhere above 120VAC, but most likely below 240VAC. The overvoltage protection circuit usually consists of a MOV and a fuse.
AC-DC converter rated for 240V and plugged into 120V might work. But there are failure mechanisms in this case too. To deliver 2.4W, the converter would pull 0.01A off 240VAC supply, or 0.02A from a 120VAC supply. Factor of 2. Granted, additional 0.01A is a very small (probably negligible) increment for a power supply. But in a larger power supply a 2x current can lead to a blown fuse, or higher copper loss in the transformer (and burn it), or higher loss in the switching transistor (and burn it).