Abstract It is significantly important to predict the remaining useful life (RUL) of organic electrochemical transistors (OECTs) for next-generation offshore electronics with stable and reliable performance. Most existing RUL prediction models are not suitable for OECTs RUL prediction tasks as they are based on the premise that components have the same aging conditions. In fact, aging conditions for different OECTs often exist in discrepancy, leading to performance degradation of RUL prediction models. Although a few methods have addressed this issue via transfer learning methods, they still suffer from the challenge in terms of an obvious discrepancy in aging data distribution caused by different aging conditions. To address this issue, we developed a novel universal RUL prediction model for OECTs, called adaptive transformer-based network, to reduce the obvious discrepancy among different aging data. First, a transformer-based feature extractor is used to capture the temporal and spatial aging features from some aging precursors. Then, a multi-scale feature alignment metric is adopted to align the aging features of OECTs by reducing discrepancy at different feature scales. Finally, an adversarial method is developed to obtain aging-condition-invariant features for further feature alignment. Extensive experiments are conducted on a real-world OECTs cycling stability aging test dataset. The average MSE of our method is reduced by two orders of magnitude compared to the one of the baseline, which indicates that our method achieves great progress for universal RUL prediction of OECTs under different aging conditions.