Optimizing accuracy and diversity: a multi-task approach to forecast combinations