Understanding the contents of com.apple.spaces.plist
I assume the IDs under each windows property are the IDs of the applications in each Space. Is that correct?


That appears to be correct. I confirmed this by saving copies of com.apple.spaces.plist over time and matching the changes in its contents to windows I moved back and forth across Spaces. There is a delay of a few seconds from when you move a window to when the plist is updated to reflect that change.


  Can I somehow, by editing this plist after a reboot, restore these window IDs to the Spaces they were assigned to before a reboot, and thus get all my windows back to where they were?


This doesn't seem to be possible. The plist appears to be a write-only source of information. That is, the OS periodically writes out what it's holding in memory to this file. But it doesn't update what's in memory by reading from this file.

I tested this on macOS 10.15.4 by making edits to the plist. They were ignored by the OS and simply overwritten with the current state of my windows and Spaces.