Hi acutbal
Using the /usr/share/plank/themes/Matte/dock.theme, I get the same output as you. A slew of warnings, but no errors. Also seems to work just fine despite all the warnings… Switching to another theme (ubuntu-mate) all I get is:
yy2@yy2:~$ plank
[WARN 13:42:27.714954] [Environment:161] XDG_SESSION_CLASS not set in this environment!
[WARN 13:42:27.785101] [Preferences:192] '/usr/share/plank/themes/Ubuntu-MATE/dock.theme' is read-only!
[WARN 13:42:28.071065] [SurfaceCache:196] Creating surface took WAY TOO LONG (33ms), enabled downscaling for this cache!
Still no matter which theme I run (tried them all) it runs just fine.
What system theme are you running? I wonder if there is a conflict. Try a different system theme.
As wolfman suggested, reinstalling plank is worth a shot. But I would use stronger medicine. There is a configuration file in your Home directory (hidden file) ~/.config/plank. Remove or rename that file and then…
sudo apt remove --purge plank && sudo apt install plank