Abstract Sharp speed variation leads to a shift of sample distribution domain, which poses a challenge for vibration-based rolling bearing fault diagnosis. Furthermore, the overfitting effects inflicted on the intelligent diagnosis model due to insufficient data will hinder the performance significantly. In this work, a Subspace Network with Shared Representation learning (SNSR) based on meta-learning is constructed for fault diagnosis under speed transient conditions with few samples. Firstly, shared representation learning based on the cross mutual information estimation is designed to promote the encoder to learn the domain invariant features. Meanwhile, we developed non-parameterized adaptive weight allocation to optimize the estimation of the discriminator. Then, the subspace classifiers in the meta-learning paradigm are employed to force the encoder to learn the discriminative features. Finally, the shared representation learning is embedded into the meta-learning and a cross co-training mechanism is designed for optimization. Thus the fusion framework is endowed with the capacity of learning distinguishable and domain invariant features simultaneously for diagnosis under speed transient conditions with few samples. Comparative experiments on two case studies of bearing fault diagnosis validated the superior performance of the proposed method, with an accuracy of 97.72% and 96.46% in 7-way and 9-way learning respectively.