Complexity of Vector-valued Prediction: From Linear Models to Stochastic Convex Optimization