Extracting latent representations from X-ray spectra. Classification, regression, and accretion signatures of Chandra sources