I found out in a different post that the half notes below need to play in parallel with some of the notes that follow (here, until the end of the measure). That seems to be the significance of the note + rest stacked up like that.
However, it seems impossible to play this on the piano: for instance, for the treble, it seems I have to both hold the E key and play it again four more times while holding it. For the bass measure, it's even worse: my hand is stuck holding the octave and cannot possibly play any other notes (outside the octave) until I lift my hand.
If I were to use the sustain pedal, that would allow me to free up my hands while holding the note for the rest of the measure, but then the following notes would just become a messy jumble because the pedal doesn't choose which notes it holds, and will hold all of them. Those chords would not sound crisp.
Can you help me understand the mechanics of playing this measure?