Engines receive a nice flow or air under the wings, so they give their full thrust.
But at the rear, engines re-accelerates the air that the body made slower. Behind the plane, air speed is more uniform, which means less wasted power.
Much drag is produced at the wings and along the body, so pushing the wings transmits less force through the plane than pushing the aft.
If an engine explodes, consequences tend to be worse at the tail than under the wing.
Put together, tail-mounted engines are less fashionable these days. They could thrive again for the improved efficiency, especially at a lifting body or a wing-only design.