Stocks used to be owned by whoever owned the physical share certificate. I think the difference is more that paintings still have some intrinsic value (though only aesthetic) even if other people don’t think they’re valuable.
The value in holding a painting is that you own some aesthetically arranged atoms.