Evolution of LMC/M33-mass dwarf galaxies in the eagle simulation