Accurate remaining useful life (RUL) prediction of bearings is the key to effective decision-making for predictive maintenance (PdM) of rotating machinery. However, the individual heterogeneity and different working conditions of bearings make the degradation trajectories of bearings different, resulting in the mismatch between the RUL prediction model established by the full-life training bearing and the testing bearings. To address this challenge, this paper proposes a novel RUL prediction method for roller bearings that considers the difference and similarity of degradation trajectories. In this method, a feature extraction method based on continuous wavelet transform (CWT) and convolutional autoencoder (CAE) is proposed to extract the deep features associated with bearing performance degradation before the degradation indicator (DI) is obtained by applying the self-organizing maps (SOM) method. Next, a dynamic time warping (DTW) based method is applied to perform the similarity matching of degradation trajectories of the training and testing bearings. Driven by the historical DIs of the given bearing, the grey forecasting model with full-order time power terms (FOTP-GM) is applied to model the degradation trajectory using a parameter optimization method. Then, the failure threshold of the given testing bearing can be determined using a data-driven method without manual intervention. Finally, the RUL of the given testing bearing can be estimated using the preset failure threshold and the optimized degradation trajectory model of the given testing bearing. The experimental results show that the proposed method retains the individual differences of bearing degradation trend, realizes the independent and reasonable bearing failure threshold setting, and improves the prediction accuracy of RUL.