The nature of submillimetre and highly star-forming galaxies in the EAGLE simulation