why "má" and not "měl", given the sentence is in the past?
Czech does not use the English tense agreement in reported speech. He said it in the present tense "Mám hlad." so the reported speach is also present ",že má hlad".
English tense agreement in reported speech is by no means an absolute. Someone can report being told that their son is hungry now, or that he was hungry yesterday. The larger context or situation makes all the difference.
So would "František řekl, že měl hlad" mean he was hungry before he said it, or is that considered ungrammatical?
Yes, was telling that he was hungry at some time before.