I
Let's take the fireball goblin again. Every DM knows that fireball is an appropriate ability for a CR5 creature. Is it really necessary to advance a goblin to 5 HD "using the humanoid advancement rules" or do you think it's probably gonna be ok if you just give him 5 HD and let him cast fireball if you want him to?
I think it'd be ok to just give the goblin 5 HD, the needed HP, attack bonus, etc., tack on the fireball (and whatever other spells if any), and run with it.
Something like this, for example (I'm actually in my office doing network stuff and my books are nowhere close, so keep that in mind

)
Marshnek of the Fire Swamp CR 5
Goblin, 5th-Level Caster
NE Small Humanoid (Goblinoid)
Hit Dice: 5d8+5 (35 hp)
Initiative: +1
Speed: 30 ft. (6 squares)
Armor Class: 14, touch 12, flat-footed 13
Base Attack/Grapple: +3/-1
Attack: Morningstar +4 melee (1d6) or javelin +4 ranged (1d4)
Full Attack: Morningstar +4 melee (1d6) or javelin +4 ranged (1d4)
Space/Reach: 5 ft./5 ft.
Special Attacks: Spells
Special Qualities: Darkvision 60 ft.
Saves: Fort +2, Ref +2, Will +5
Abilities: Str 11, Dex 13, Con 12, Int 14, Wis 12, Cha 8
Skills: Stealth +9, Perception +9
Spells Prepared (4/4/3/1; DC 12 + spell level):
1st-
true strike, magic missile (x2),
burning hands;
2nd-
blur, darkness, scorching ray;
3rd-
fireball
He should I guess have 0-level spells, but I omitted them. He's also using his Dex mod on all attack rolls just as if he had the Weapon Fin. feat (which wouldnt work with his morningstar anyway).