Note that “Serverless” can often mean there is still a container per say (e.g. AWS) but that container can scale down to 0 instances via an idle time. That is, there is still a container/runtime (e.g. JVM) but we don’t have much control over it.
In that sense “cgi script” isn’t an exact match to “serverless” with respect to startup cost per request.