yes extend spell works as long as you have the spell in your spell book ie if you have inproved invis and can slot it yes the improved invis from drow will be extended as well same with haste or any other spell.
you have to have the spell memed or it will be usless
So yes, metamagic works with spells from shifted shapes, you just need to be capable of casting it normally first.
A druid/monk/shifter who specialises on rakshasa form for instance, can empower and maximize ice storm, but not melf's acid breath, as a druid can cast ice storm, but not melf's acid breath (an arcane spell).
It
may be possible to get around this by leveling up in a class that can cast the spell, slot it in your action bar with metamagic, and then delevel back down and level as normal,
test first though!
E.g. druid11/shifter10/wizard11 (For 6th lvl slots), slot a maximized melfs acid breath.
Delevel to druid 11/shifter/10 then level as normal, such as druid29/shifter10/monk1.