I'd look very closely at whether your test scores are truly interval scaled, or merely ordinal. They might be interval, but in the German academic system with grades 1-6 (1-4 is passing), there sometimes seems to be a dichotomy between the best grade 1 and everything else, as in "everything less than 1 means I'll start arguing with the teacher" - in which case I think one can make a convincing argument that the scale is in fact ordinal.
If your scores are truly interval, then you can try transforming either scores or class size to get a roughly linear relationship, then try pearson-r.
If your scores are ordinal, or you simply can't get a linear relationship, try spearman-rho or kendall-tau. I personally prefer Kendall's $\tau$, simply because I like the rationale with concordant and discordant pairs better, but to a degree, the choice between Spearman and Kendall is one of taste. Consider looking at our relevant question Kendall Tau or Spearman's rho? for inspiration.