This paper proposes an innovative framework for medium-term wind power forecasting, employing a robust, multi-module Artificial Intelligence approach to improve prediction accuracy and reliability over extended horizons. The framework consists of three key components: an internal–external learning process, a vertical–horizontal learning process, and a residual-based robust forecasting method. The internal–external process combines Variational Mode Decomposition with a stacked N-BEATS model, achieving stable and accurate forecasts across nearly 200 time steps. The vertical–horizontal process integrates the Polar Lights Optimizer with Joint Opposite Selection and a regression model based on the bidirectional long short-term memory and the gated recurrent unit, enabling efficient hyperparameter optimization and yielding a determination coefficient above 0.9996 for training data and a normalized root mean square error of 0.2448 for test data. We compared our proposed method with nine classical and state-of-the-art techniques and found that it delivers higher accuracy in medium-term prediction, extending to nearly 200 steps. The residual-based method addresses uncertainties by generating 95% confidence intervals, enhancing the model’s robustness in practical applications. By simulating real-world conditions, this framework provides reliable medium-term forecasts, making it an effective tool for renewable energy system dispatch and precise error control.