Flexible batteries and wiring exist. If the "hard" electronics like the CPU and memory were placed along one edge of such a device you could still flex, bend or roll the display portion.
It's also possible that electrically activated memory-metals could be used to "snap" such a device into a stiff rectangle when in use, but we have a way to go on those technologies yet.
It's also possible that electrically activated memory-metals could be used to "snap" such a device into a stiff rectangle when in use, but we have a way to go on those technologies yet.