I had a similar question some time agoOne can use "big abelian categories". See: Why need the morphisms to form a set ?
It turns out that thereA "big abelian group" is no need to requirea class that satisfies the morphisms of a category formsame properties as an ordinary abelian group except that the underlying class doesn't need to be a set. Therefore one can form the functorThen a big abelian category $C^D$ for any categories $C, D$ in the usual way and it is again a category with the same properties as an ordinary abelian category except that the hom's aren't abelian groups but big abelian groups (those morhisms may form a proper classsee: Mitchell: "Theory of Categories", VII.1, page 164).
The usual proof that $C^D$ is abelian if $C$ is abelian and $D$ is small carries over without difficulties.
BTW: If the objects of a category form a proper class to show that $C^D$ is (big) abelian if $C$ is abelian and the morphisms form a set then the category$D$ is called "locally small"any category.