L293D heating quickly under 0.5 A (driving a DC motor using adafruit motor shield v1)
Maximum power dissipation of the L293D is far less than 5W. The N type package will warm up 67 degC per watt dissipated (pg 4 of data sheet) and 2.5W would likely push it past the limit of 150 degC stated on page 4 also.

It's hardly ever good news with the L293D (and its near-identical twin the SN754410). These are poor choices for H bridges if you are pushing the current over 0.5A and by the sound of it you are. There is also a suspicion that an RC motor probably isn't rated at 12V but somewhat less so you are probably pushing this just too far. Most RC batteries I've seen are about 7.5V.

Back to the L293D (aka SN754410).... When driving a load it doesn't act like a relay contact - it loses about 1.2V on the lower transistor and 1.4V on the upper transistor - take half an amp or so and the power dissipated is already 1.3 watts and has taken the N package device up 87.1 degC above ambient. That's quite hot in an ambient of 25.

Not a good choice of H bridge but, to be honest I'm yet to hear of an application when the L293D (SN754410) is a good choice. I'd look into the DRV8837 from TI. It has a combined high and low side mosfet on resistance of 0.28 ohms meaning, at 0.5 A the total volt drop is 0.14 volts and the internal power dissipated is 70mW. Maximum motor voltage is 11V but, I suspect you may be over-powering your motor anyway. There are probably others from TI that have a higher voltage rating.