I've just been upgrading/updating my mathematics forum (I haven't got to the Moodle yet) and had the same problem. Check in class.latexrender.php (in the variable definitions near the top of the file) that you are creating PNG files (my guess is that they are GIFs).
Hope this helps,
we had some discussion about changing gifs to pngs in http://moodle.org/mod/forum/discuss.php?d=120418
and if that does not help the next question is which distribution of latex does your new moodle / Ubuntu use?
If moodle can't find any distribution of latex from your Ubuntu using the path settings of Tex filter (in administration menu) it will try to use mimetex from filter/tex and quality of mimetex is always worse than quality of gif or png images from teTeX or Tex Live for example...
I followed the link and using png's instead of gif's solved the problem. Great! But I really can't understand why. I use the same Moodle distributions on my two servers, the path settings in the Tex-filter is ok, and I am running
pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
on my new (bad) server
pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
on my old (good) server.
So why would there be a mismatch?