In nuclear fusion research, the effective ion charge Zeff, which characterizes the overall content of impurities, can be experimentally derived from the plasma electron-ion bremsstrahlung, given the electron density ne and temperature Te. At Wendelstein 7-X, a multichannel near-infrared spectrometer is installed to collect the plasma bremsstrahlung along 27 lines of sight covering more than half the plasma cross section, which provides information on Zeff over the entire plasma radius. To infer spatially resolved Zeff profiles, a Bayesian model is developed in the Minerva framework. Zeff, ne, and Te profiles are modeled as Gaussian processes, whose smoothness is determined by hyperparameters. These profiles are transformed to fields in Cartesian coordinates, given the poloidal magnetic flux surfaces calculated by the variational moments equilibrium code. Given all these physical quantities, the model predicts line-of-sight integrals of near-infrared bremsstrahlung spectra. The model includes the predictive (forward) models of the interferometer, Thomson scattering system, and visible and near-infrared spectrometers. Given the observations of all these diagnostics, the posterior probability distribution of Zeff profiles is calculated and shown as an inference solution. The smoothness (gradient) of the profiles is optimally chosen by Bayesian Occam's razor. Furthermore, wall reflections can significantly pollute the measurements of the plasma bremsstrahlung, which leads to over-estimation of Zeff values in the edge region. In the first results presented in this work, this problem does not appear, and the posterior samples of Zeff profiles are overall plausible and consistent with Zeff values inferred, given the data from the single-channel visible spectrometer.