Text this: Optimal spectroscopic measurement design: Bayesian framework for rational data acquisition