The other answers address the mass, but none of them really gives you a real reason for the volume, so I will address that in detail.
Quarks and antiquarks are elementary particles, pointlike, with no spatial extension or substructure as per the SM.
Mesons, are hadronic subatomic particles made up of a quark and antiquark pair, bound by the strong force.
Because mesons are composed of quark subparticles, they have physical size[further explanation needed], notably a diameter of roughly one femtometer,1 which is about 1.2 times the size of a proton or neutron.
Now you are asking, because the PEP does not apply to bosons, why does the composite meson have a volume?
Now quarks are fermions, and they do obey the PEP. But it is not that simple. The PEP is only for identical fermions. The quark and antiquark cannot come close together (more precisely why they cannot occupy the same QM state) because of the PEP is not correct to say (since they are not identical). There are more reasons why, and one of them is because at very short distances there is the phenomenon of asymptotic freedom, which will cause the binding force to become less important.
There are actually two more features in the soup that might address the OP's question. First, as two quarks get far too close, asymptotic freedom makes their gluon interaction essentially insignificant -- their are freed from each other. And if they are the same kind they exclude each other by the Pauli principle; if not some type of antisymmetrization may also be provided by a generalized version of that principle.
The other reason is why the composite meson (or anything composite made up of quarks) does have a volume, is that you have a false imagination of how quarks make up mesons. You believe mesons are just a quark and antiquark. In reality, it is called a sea of quarks, antiquarks, and gluons, that creates the meson, and only if you take a net picture of the meson (considering conservation laws and annihilation), then will you find a quark and a antiquark left.
Quarks and antiquarks and gluons dance around and annihilate and pair produce in a non stop manner, so they do "overlap" in the feynman diagrams of the individual interactions, and annihilate. The three valence quarks are lost in the soup, and in any case it is a matter of conservation of quantum numbers, there should be an excess of one down and two up for the proton.
So it is not a matter of repelling, it is just that overall the quarkness up and down should add up to the valence quarks of a proton, and the same holds for the neutron two down one up excess in the soup .