Rematch team improvements are dependent on reaching certain plot flags and fighting the previous rematch team (if any).
This wiki link from the pokecrystal disassembly talks about the system a bit, and we can also see for ourselves.
For example, let's look at Joey's rematches in
Route30.asm.
Code:
.Rematch:
scall .RematchStd
winlosstext YoungsterJoey1BeatenText, 0
readmem wJoeyFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
.Fight4:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight4
.Fight3:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight3
.Fight2:
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight2
.Fight1:
checkflag ENGINE_FLYPOINT_GOLDENROD
iftrue .LoadFight1
So to get his first rematch team, you have to have reached Goldenrod. For the second rematch, you have to have reached Olivine and beaten his first rematch team, and so on.
Later on in the same file is the HP Up code, under "LoadFight4".
Code:
.LoadFight4:
loadtrainer YOUNGSTER, JOEY5
startbattle
reloadmapafterbattle
clearflag ENGINE_JOEY_READY_FOR_REMATCH
checkevent EVENT_JOEY_HP_UP
iftrue .GiveHPUp
checkevent EVENT_GOT_HP_UP_FROM_JOEY
iftrue .done
scall .RematchGift
verbosegiveitem HP_UP
iffalse .PackFull
setevent EVENT_GOT_HP_UP_FROM_JOEY
sjump .NumberAccepted
Based on this, I assume that Youngster Joey will only give you an HP Up on the final rematch team.