Ideally, you'd prime before you paint, but I've been guilty of spraying my basecoat on the bare plastic/resin/metal myself...
In fact, I did this with a lot of my Dropfleet Commander ships; a spray of silver directly on top of the bare plastic. I glazed on top of that and ended with a coat of varnish.
I've had no chipping whatsoever with them (although they only rarely leave the cabinet to be honest). But these are plastics, which are a lot more forgiving in that respect. Metal miniatures might be more prone to chipping, especially on edges.
So; TLDR: you can, but there is an increased risk of chipping...