Yes, Aegislash changes form whenever it attacks.
If it were to use rest, then sleep talk, and shadow ball was used, it would change to blade form if it wasn't already in blade form. However, if kings shield was used, it would change to shield form if it wasn't already in shield form.
Hope I helped!