Yes, stance change does activate when you use an attacking Z-Move, however it will only Stance Change into Shield Form if you use King's Shield or Z-King's Shield,
Source: https://www.youtube.com/watch?v=xWUQUcLKtpE at 8:55
Yes stance change does activate if you use z-king’s shield. battle replay
Note: I did play hackmons due to the fact that I couldn’t figure out where else to use aegislash.