This is why eg cloud providers don't rely on the OS to isolate customers from each other.
Since the reneissance of virtualization, many security focused systems have built on that, like Qubes OS, seL4-based virtualized systems, etc.
To design a secure system one must first ask who is going to attack it and with what forces.
Making truly secure systems is an art and is rarified ground.
It's a kernel that has served us well, especially considering its ubiquity, but it will never be a "secure" kernel.
But yeah, there’s plenty of things you’d do differently if you wanted to properly secure Linux. It just shows that economically that’s not the most important thing for companies using Linux.
The design choices you’d make to build a secure OS (kernel and user space) looks very different. The microkernel design is a more secure design but techniques to make it work fast took a very long time to develop (+ computer HW also got fast enough that the overhead is no longer as big of a deal + we have multithreading everywhere that microkernel can sometimes exploit more naturally).
Simply mounting a file system can result in your system being compromised if the file system was maliciously crafted. This isn't something that is actively protected against.
Another issue I can think of OTTOMH, is unprivileged user namespaces causing lots of security issues to surface because certain parts of the kernel's code was written with the assumption that only "root" would be able to invoke it, so if you already were "root" securing this didn't matter.
There are many, many more issues similar to these, too many for me to write about, and probably many that are way beyond my comprehension. I don't think it's wrong to say that Linux has not been very secure.
Linux is a monolithic UNIX-like OS, with all the implications of an accidental design that dates to the late 60s/early 70s.
For starters, it has huge (Linux has MLoCs) TCB. And it is very trusted (undeservedly so) code, as it runs with supervisor privileges.
One bug in these MLoCs is all it takes.
There are far better system architectures out there.
For example, privilege elevation in Linux is a very complex and complicated mechanism. The famed "sudo" command has a very long history of bugs. To the point that I remember RHEL peddling their own version ("ksudo" if memory serves... I cannot find any mentions of this, it was some 15 years ago). It's very hard to get things right. Especially, to prove that you've done things right, if you are after security.
The system interface is designed "for comfort" rather than "for security". Many things could've been a lot more secure, but very tedious on application programmer (imagine SeLinux, but in hyperactive mode... that's every sysadmin's nightmare).
In practice, with a lot of community effort, tools like "sudo" eventually reached a point where they are mostly reliable for what they are expected to do. So, to face practical threats, today, the system may be OK, but this isn't the testimony to its design, rather it is a consequence of how much effort was spent plugging the holes.