Rolling bearings are critical components of marine shafting power transmission systems, and accurate prediction of their vibration signal trends is essential for predictive maintenance. To address the limited adaptability of conventional time-series forecasting models under varying operating conditions and their insufficient ability to capture strong noise and abrupt changes, this study proposes a vibration signal prediction method that integrates particle swarm optimization (PSO) with an improved Informer model. PSO is used to adaptively optimize key Informer hyperparameters for different operating conditions, while a rolling time-window mechanism is introduced to enhance the capture of abrupt signal variations. In addition, a mixture of sparse attention (MoSA) encoder with a collaborative dense-head/sparse-head structure is designed to balance global temporal dependency modeling and local fault feature extraction. Experimental results on the Case Western Reserve University (CWRU) bearing fault dataset show that the proposed model outperforms Long Short-Term Memory (LSTM), Transformer, Informer, iTransformer, and Flowformer in terms of Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Erro (RMSE). The model achieves an MSE of 0.2015, which is 25.5% lower than that of the second-best iTransformer model. It also demonstrates robust performance under four different bearing operating states, confirming its adaptability to complex operating conditions. The proposed method provides a promising technical route for the predictive maintenance of rolling bearings in marine shafting systems.