In constructing high-speed railway tunnels, reconciling excavation volume with aerodynamic performance poses a fundamental challenge. The tunnel design with non-uniform cross-section may provide a novel solution to this dilemma. This study numerically explores the aerodynamic effects of a high-speed train (HST) travelling through variable cross-section tunnels with different lengths of enlarged segments (Le), compared to the equivalent uniform cross-section tunnel. The unsteady simulation employs the sliding mesh technique, compressible, Reynolds-Averaged Navier-Stokes (URANS) model, and validated through full-scale test to ensure precision. Investigation focuses on pressure patterns on train surfaces and tunnel walls, train-induced slipstream, aerodynamic loads, and micro-pressure waves. The results indicate that the maximum pressures on train surfaces may slightly increase with longer Le, while minimum pressures are significantly mitigated. Peak-to-peak pressures on tunnel walls follow a power-law pattern decrease with Le, with a maximum reduction by 28 %. Slipstreams in middle tunnel segments display parabolic growth with Le, guiding design considerations within specific ranges. Despite variations in Le, average drag of the vehicle remains consistent, and safety impacts due to cross-section changes are negligible. Additionally, variable cross-section tunnels demonstrate inherent advantages over the uniform cross-section tunnel in mitigating micro pressure waves, showing a maximum mitigation by 9 % at 20 m away from tunnel exit. Overall, variable cross-section tunnels offer promising solutions for aerodynamic optimization in future railway tunnel design.