Bayesian Inference Using the Proximal Mapping: Uncertainty Quantification Under Varying Dimensionality