Use it on your main or favorite character. The HP+SP boosts from AP pets are much better than SP boost from MadFly, and if you only have one then you want to have it on the char you intend to play most often.
Pets will never keep level with you anyway unless you do nothing but sit around afk all the time. And by starting it "late" at level 27, you're only missing 40-50 or so hours of pet xp time which is really nothing compared to the xp it takes your pet to hit the later levels. It's not a big deal.