A key component of earthquake early warning system is the development of an accurate and robust predictive model relating the recorded waveform to seismicity and ground‐shaking characteristics. This article presents a probabilistic Bayesian inference methodology to address relevant sources of uncertainty in the development of such predictive models. We investigate the calibration of models for the earthquake magnitude based on the maximum predominant period, considering the Sichuan region of Southwestern China as a case study. Established approaches for developing predictive models in this context adopt deterministic tools for some aspects of this development. They consider a linear regression calibrated typically through least squares optimization and frequently utilize the mean observations for each event averaging across the data available from different stations. The proposed Bayesian learning accommodates the following improvements: a model class selection is established, comparing across different candidate models to promote the most appropriate from accuracy and robustness perspectives; the full posterior distribution of the model parameters is identified, quantifying relevant uncertainties in their values; a heteroscedastic model is considered for the estimation error variance; and the observations are separately considered at the calibration stage. Each of these improvements ultimately addresses a different source of uncertainty impacting the predictive model development. We utilize transitional Markov chain Monte Carlo for obtaining samples from the posterior and for calculating the evidence to perform the model class selection. Different regression models are examined, and the Bayesian‐based model identification is compared against the common least squares identification approach. Results show the value added by comparing across the different models and by considering a heteroskedastic variance model, offering insights into the advantages of Bayesian‐based predictive models in earthquake early warning applications.