There are 2 existing documents, explaining what type of data is stored by ODM and ODMAD products in the backend database:
On Demand Global Settings Current - Security Guide (quest.com)
On Demand Migration Current - Security Guide - Active Directory (quest.com)
The data is stored as long as the ODM Organization exists, but there are exceptions. For example, in ODMAD, if object (like on-prem user) has changed attribute and we read the change, the old value is gone in the database because it's being overwritten. Or if user went out of scope and there was a Reconcile process executed - user's data will be deleted immediately.
Environments are "archived" which is a soft-deletion. Any environment that are being deleted by the customer from the UI (not using direct backend database modification) will be removed from the system after 30 days. During that time, data is considered soft-deleted. Now this is only for the Environment since this is where the data is kept. All data is bound to the environment. So this is considered as user-driven action, which customer must initiate the request from the UI by deleting/archiving the environment. There is also the automated offboard which is related to License: if license is expired for their Org, everything will be offboarded after 60 days.