Gaia-ESO Survey: Analysis of pre-main sequence stellar spectra