I can only speak to AWS. As long as you don’t delete the instance (“terminate”) it can stick around indefinitely in a shut down state.
If you are using ephemeral storage for it (not the default, I don’t think ) then the storage will be deleted when you turn it off. But a standard block storage device should be fine.