The future of energy flexibility in microgrids (MGs) is steering towards a highly granular control of the end-user customers. This calls for more highly accurate uncertainty forecasting and optimal management of risk and flexibility options. This paper presents a novel data-driven model to optimize the operation of MGs based on a risk-averse flexi-intelligent energy management system (RFEMS), considering the rising challenge of global climate change. It considers the presence of renewables, a diesel generator, and flexibility resources (FRs) containing a demand response program (DRP), distributed electric vehicles (EVs), and electric springs (ESs). In the first phase, the proposed model, by means of a novel hybrid deep-learning (DL) model, forecasts uncertain parameters associated with wind and solar generations, load demand, and day-ahead energy market price. The architecture of the proposed hybrid forecasting model is composed of several stacked restricted Boltzmann machines and a cascade neural network. In the second phase, the MG operator (MGO), based on the obtained uncertainty forecasting results, in the context of a hybrid risk-controlling model, optimizes the MG operation using the provided demand-side flexibility. The proposed optimization problem is linearized stochastic programming with robust concepts, subject to AC optimal power flow constraints, MG flexibility restrictions, and operating limits of local resources. Finally, the efficiency of the proposed RFEMS by using real German datasets on a 33-bus test MG is analyzed. Numerical results demonstrate the superior performance of the proposed forecasting model over several hybrid DL models. In particular, the root mean square error (RMSE) index for wind, solar, load, and price forecasting is improved by 53.35%, 73.24%, 80.24%, and 58.1%, respectively. Further analysis of the proposed RFEMS reveals that operating indices in two 33-bus and 69-bus test networks are significantly improved. It paves pathways to risk-averse, flexible, and economic operation of smart active distribution networks.