First, make sure the backup mailbox you created on your iPad is actually stored in iCloud and not on the device itself. Open the Mail app on your iPad, tap “Mailboxes,” and locate the folder. If it’s listed under “On My iPad,” then it's a local mailbox and won’t sync with iCloud. In that case, you’ll need to move the messages into a folder under the iCloud section. To do this, select all the emails, tap “Move,” and place them into a new iCloud mailbox—for example, a folder called "Sync Recovery" that you create specifically for this step.
Rather than moving the messages directly back into the Inbox (which sometimes causes syncing issues due to how iCloud treats restored messages), try first moving them to another iCloud-based folder. Create a new folder in iCloud, perhaps named “Recovered,” and move the messages there. Wait a few minutes, then check iCloud.com or your iMac to see if the emails appear in that folder. If they do, that confirms the emails are now properly syncing through iCloud.
Once the emails are visible in the “Recovered” folder across your devices, try moving them back into the Inbox—but do this from your iMac or iCloud.com, not the iPad. Moving them from within the iCloud environment (as opposed to from a device that had previously been offline) will help ensure that the messages are correctly re-indexed by iCloud and propagate as expected across all devices.
If the Inbox on your iMac still doesn't reflect the changes, try rebuilding the Mail app’s index. Open the Mail app on your iMac, go to the Inbox, and then click Mailbox > Rebuild. This forces the app to re-download and re-sync all messages from the server. Additionally, it’s a good idea to check your account settings under Mail > Preferences > Accounts > iCloud > Mailbox Behaviors to ensure that the correct folders are assigned for Drafts, Sent, Trash, and so on. Misconfigured folder assignments can also interfere with proper syncing.
This issue most likely began with a corrupted sync or sudden data loss that triggered iCloud to delete the Inbox contents across devices. Because iCloud syncs deletions rapidly, it affected all connected devices—except your iPad, which you wisely disconnected in time. You've taken the most critical step by preserving the emails, and now it’s just a matter of carefully nudging iCloud to recognize and sync them properly again.