Yes and no, GNU time tries to show the summary/peak of everything.
You may check that using a small C program, say
int main(int argc, char **argv)
bytes = atol(argv) * 1024;
buf = malloc(bytes);
memset(buf, 0, bytes);
$ gcc mal.c -o mal
$ /usr/bin/time -f "%M" sh -c "./mal 5000"
$ /usr/bin/time -f "%M" sh -c "./mal 10000"
$ /usr/bin/time -f "%M" sh -c "./mal 5000; ./mal 10000"
But as mentioned in the getrusage(2) man page (Linux), this is the max RSS of any single child process, not the instantaneous cumulative RSS of a tree of processes, all simultaneously using memory
In other words it does not summarize parallel or background processes, as you can see:
$ /usr/bin/time -f "%M" sh -c "./mal 1000000 & ./mal 5000"
This also implies that you need to run
time inside of your screen session to measure $CMD and not only screen.
FYI the difference between the shell built-in is that the time binary can't directly summarize pipes or functions:
$ time /bin/sleep 1 | /bin/sleep 2
$ /usr/bin/time -p /bin/sleep 1 | /bin/sleep 2