RI-Loss: A Learnable Residual-Informed Loss for Time Series Forecasting