Excited states of one-dimensional defect CFTs from the quantum spectral curve