Traffic flow modeling plays a crucial role in intelligent transportation systems, which is of vital significance for mitigating traffic congestion and reducing carbon emissions. Owing to the uncertainties and nonlinear characteristics of traffic flow, it confronts a considerable challenge to establish a model to predict traffic flow efficiently and robustly. Kernel-based extreme learning machine (KELM), a natural extension of extreme learning machine (ELM) that incorporates kernel learning, has demonstrated excellent performance in traffic flow prediction. However, the performance of KELM may significantly decrease when the noise is non-Gaussian, as it was developed under the minimum mean square error (MMSE) criterion assuming Gaussian noise. To address this issue, we propose an error-distribution-free kernel extreme learning machine, termed ɛDFKELM, by embedding a more robust optimization criterion to guide the training. In addition, we further develop an online version of the ɛDFKELM model for continual forecasting, called ɛDFKELMv2. We perform extensive experiments on two widely-used public benchmark traffic flow datasets, which illustrate that the ɛDFKELM model outperforms the state-of-the-art approaches in terms of forecasting performance. ɛDFKELM model achieves RMESE values of 251.49 vehs/h, 196.27 vehs/h, 216.97 vehs/h, and 160.92 vehs/h on the A1, A2, A4, and A8 highways of Amsterdam dataset, respectively.