Depending on your environment you can use ls | sort -Vv works herewith GNU coreutils, as ine.g.:
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-sOutputFile=out.pdf $(ls -v)
Or if you are on recent versions of FreeBSD or OpenBSD:
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-sOutputFile=out.pdf $(ls | sort -V)