Stance change only affects base stats, so the EVs, IVs and natures will stay the same no matter what form, so if you want to have an offensive Aegislash you should still invest in attack, etc., etc.
Just invest the EVs into what you want it to have and don't worry about it switching.
Source: Gamefaqs forum and experience
Hope I helped.