Accurate prediction of the remaining useful life (RUL) of bearings is crucial for maintaining the reliability and efficiency of industrial systems. This study introduces a novel methodology integrating advanced machine learning and optimization techniques to address this challenge. (1) A transformer-attention model was developed to process segmented vibration signals, effectively capturing complex patterns. The model showed better performance than traditional approaches, with an RMSE of 0.989. (2) A Deep Neural Network (DNN) was designed to predict the extended RUL of bearings after laser shock peening (LSP) remanufacturing. The fruit fly optimization (FFO) algorithm was employed to optimize the remanufacturing parameters; a 29.33% improvement was achieved in fitness compared to the baseline. (3) The DNN model predictions were validated against Finite Element Analysis (FEA) simulations, with a low relative error of 2.5% to 5.8%; the model showed good accuracy in capturing the effects of optimized LSP parameters on bearing life extension.