In Linux, executables can have any valid file name. The file extension is not considered by the operating system when deciding how to execute the code. Instead, the "magic numbers" of the file are examined.
It happens that in MacOS and Linux, shared libraries and full programs have the same structure: shared libraries just do not happen to have an entry point marked in them.
... and .mex* files are, on all operating systems, shared libraries (in a format appropriate to the operating system.)
So, Yes, even if Linux cared about file extensions, the file type for a mexa64 is the same file type as for programs. But a typical mexa64 would not define a valid entry point.