The old messages are retained on your old device in its memory until/unless you Erase All Content and Settings on your old device.
Unlike other devices, iPhones do not store anything on the SIM card, so it doesn't matter whether your old device has an activated SIM card or not.
Once you transfer your cellular service to your new device, your old device remains a snapshot of what your content received via your cell network looked like at the time you transferred your content to your new device.
Note that your old device will still get iMessages (blue bubbles) as long as it remains signed into iMessage, and as long as it is on Wi-Fi it can also place calls and get text messages that way if you choose to configure it to be able to, as an iPhone without cellular service is effectively an iPod Touch.