  Deep imaging of galaxy cluster fields have in recent years revealed tens of
candidates for gravitationally lensed stars at redshifts $z\approx$ 1-6, and
future searches are expected to reveal highly magnified stars from even earlier
epochs. Multi-band photometric observations may be used to constrain the
redshift, effective temperature $T_\mathrm{eff}$ and dust attenuation along the
line of sight to such objects. When combined with an estimate of the likely
magnification, these quantities may be converted into a constraint on the
stellar luminosity and, for an adopted set of stellar evolutionary tracks, the
initial stellar mass. Further characterization is, however, difficult without
spectroscopic observations, which at the typical brightness levels of
high-redshift lensed stars becomes extremely challenging for even the largest
existing telescopes. Here, we explore what spectral features one can
realistically hope to detect in lensed stars with peak brightness in the range
26-28 AB mag, $T_\mathrm{eff}=$ 4000-50 000 K and redshifts $z=$1-10, using
spectroscopy with the James Webb Space Telescope (JWST) and the forthcoming
Extremely Large Telescope. We find that a majority of detectable lines appear
in the rest UV-range for stars with $T_\mathrm{eff}\geq$15 000 K. The strongest
detectable spectral lines are the C IV $\lambda$ 1550 \r{A} line and the Si IV
$\lambda\lambda$1393, 1403 \r{A}-doublet at $T_\mathrm{eff}=$30 000 K. For
lower temperatures, the calcium H- and K-lines at $T_\mathrm{eff}=$6000 K are
among the most readily detectable. In limited wavelength ranges, ELT is
expected to provide more sensitive spectroscopic observations, and with higher
resolution than JWST. We find that variations of both mass loss rate and
metallicity lead to noticeable effects in the detectability of certain spectral
lines with both JWST and ELT.
