Bayesian inference with subset simulation in varying dimensions applied to the Karhunen–Loève expansion