iMessage with shared Apple ID
Changing the password should be sufficient. You can see which devices are currently logged in with your Apple ID by following the instructions provided in this Apple support article:
Check your Apple ID device list to see where you're signed in

You can also remove devices from your Apple ID profile by clicking the Remove button that appears in the device information box after you've clicked on one of the devices.

As an added step, I would highly recommend turning on two-factor authentication after you get everything squared away. You can read more about two-factor authentication and how to enable it in the following Apple support article:
Two-factor authentication for Apple ID