The memories taken from the living aren't deleted, they are stored on the cloud. The terminals in Living Memory. So yes, once someone dies, they would get all their memories back. However, taking their memories to "spare them pain" causes a bunch of other issues for the narrative. Like why did anyone agree to this? What about written records? What about spare bedrooms? If you kid dies and you have a room for a child and you can't remember why, you'll know what happened. People would have major personality changes if entire swaths of their memory were removed every time someone died. And most importantly, what's the point of the Endless if you're just erasing the memory of the dead anyway? They'd be spared pain if they could remember grandma is right upstairs kicking it by the Ferris wheel. It seems they added that to make the regulators and Alexandrian society seem more dystopian, but it actually causes a lot of plotholes.

As for how we're supposed to regard the Endless, we're supposed to care enough about them to cry when the sad music plays, but we're not supposed to care enough to slow our progression to the final trial. It's another problem due to lazy writing. They tell us the Endless are subhuman and deserving of no consideration whatsoever, but they want us to cry when we delete everyone's mommy so they have them behave 100% human. Very few people are capable of this level of doublethink, so most people just pick one. Either the Endless are AI and everything you do in the final zone is a colossal waste of time or the Endless are people and you're a war criminal.

Choose your poison and enjoy.