I've heard this:
Why "-te" form? And is て there at all? It looks to me ungrammatical.
Why not this?
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.Sign up to join this community
～てた is an extremely common casual contraction of the past continuous ～ていた (in the same way that the present continuous ～ている is commonly contracted to ～てる).
So the difference between お腹がすいた and お腹がすいてた is the same as the difference between their present-tense equivalents お腹がすく and お腹がすいている. The former means "I become/became hungry" and the latter means "I am/was hungry".
In practice, お腹すいたんだ would usually be taken as meaning "I'm starting to get hungry right now" (because the plain past tense of a verb that indicates a change in state is commonly used to indicate that that change has just occurred), whereas お腹すいてたんだ indicates that the speaker has been hungry for a little while.