It's hard to imagine getting work done on a shared Z80 machine with everybody sharing the same 64kB of memory. Z80s were already plenty slow and the working memory tight. Sharing that with other users sounds miserable.

You had bank switching. So for example the MP/M system I used (Altos) would allow several terminals (serial) of which each would get a command processor in a bank. I think it had 256KB, maybe 512. You know, I never ever remember thing thing crashing, even with multiple terminals/sessions.

Multiuser machines could get away with surprisingly little memory; They had some major advantages over home computers:

Users were all connected via CRT terminals over serial, so you didn't need to waste any memory on screen buffers. This also reduced CPU usage as the user wouldn't get any CPU time until they pressed a key, and the scheduler might queue up multiple key presses before even switching to the user's task (while still showing immediate feedback)

They also had superior IO. Home computers were connected to slow floppy drives (at best, some were still using tape) so they typically tried to keep the whole working set in memory. But multi-user machines had relatively fast hard drives and could afford to shuffle the working set in and out of memory as needed, with DMAs handling the actual transfer in the background.

As others have pointed out, these machines had bank switching. But I doubt such machines were ever configured with more than 256k of memory, with 128k being more typical. Wikipedia claims 32k was the absolute minimum, but with very little free memory, so I suspect 64k would be enough for smaller offices with 4-6 users.

I had after school computer classes on a shared 8080 system running MP/M. Worked very, very well.

We had shared S100 8080 systems in our EE lab at university. 7 terminals per CPU. Worked just fine for editing programs. But when everyone started a (Pascal) compile run at the same time, things got plenty slow.

I’d note those competed with minicomputers, my high school had a PDP-8 circa 1981 when I was taking a few classes there while still in elementary school. The PDP-8 could support three terminals of interactive BASIC or could be brought up in a single user mode where you got more memory and could run bigger programs like the Crowther & Woods ADVENTURE. A bigger school has a PDP-11 with about 20 terminals. By 1985 or so my school got a VAX-11/730 which is basically like a modern computer.

Yes, at my first job, we had a VAX 11/785 which ran an entire engineering department. About 30-40 terminals.

It would usually be lightweight data entry, and it would work as fast as people could type (which was pretty fast for dedicated data entry workers).

Often they had bank switching to access more memory.