Is there a permanent and secure (as in integrity) way to make the entire Ubuntu system of a VPS (virtual private server) read-only to all users (including the root user)?
Yes, using Mandatory Access Control. It would be an awful lot of work, though.
Mandatory Access Control systems allow you to impose restrictions on actions, even those performed by root, and with the ability to be granular to the process (e.g.
dhcpcd running as root can edit /etc/resolv.conf, but
vi running as root cannot).
It's likely impossible to have a running Ubuntu system which is completely read-only. Various OS processes expect to be able to write to files (e.g.,
/bin/login wants to update
wtmp; lots of things want to log). Of course, if you can figure out all those files, you can permit necessary access, but doing so is quite a chore.
The most commonly known MAC system is SELinux. To quote Wikipedia,
SELinux can potentially control which activities a system allows each user, process and daemon, with very precise specifications. It is used to confine daemons like database engines or web servers that have clearly defined data access and activity rights. This limits potential harm from a confined daemon that becomes compromised.
Which matches the goal you stated in the comments:
create an environment which is read-only in case of a buffer overflow (which will be given as a challenge).
MAC systems generally require "something special" to turn them off, such as rebooting into a special mode, which is not accessible to a remote attacker. (Obviously, if root can just "turn it off" easily, it doesn't protect against root.)
Allow me to repeat myself: doing this is an awful lot of work. Systems like SELinux can be prohibitively difficult to configure correctly; in general you will find them working in limited, targeted protection profiles (e.g., "don't let the web server get at stuff") and distributed in a tested, controlled configuration from an OS vendor (Red Hat does this, for example). If you want to use it to lock down everything, you've got a lot of work to do.
For what its worth, one of AppArmor's selling points is that it's easier than SELinux, so the fact that you're on Ubuntu may put the odds ever in your favor.