How can I compile some LaTeX source into PDF and keep the LaTeX source as some meta-information in the PDF? (or somehow embedded otherwise in the way that it is easy to retrieve the LaTeX source while having the option not to view it when reading the PDF)
This might be a bit of a hack, but you can edit pdf files directly. If it was a short amount of text, you can just open the pdf file in a text editor such as vim and write a comment, e.g. "%This file was written by Batman". However, that wouldn't be generated every time you compile the latex document.
An alternative could be to add something to a makefile (if you are using a makefile to compile the document) that appends the string you want to the output pdf file.