The capacitor value and rating is derived from the magnetics isolation rating, which in turn is determined by the bandwidth and economics of the transformer.
So, starting from the beginning:
The transformer uses enameled twisted pair, making a transmission line transformer. Given the bandwidth requirements, a small ferrite core is used, and some 10s of cm of wire, giving a cutoff frequency above 100MHz or thereabouts. Wire length determines HF cutoff frequency, and core size and turns determines LF cutoff.
Enameled wire is typically somewhere between functional and basic insulation type, good for a few hundred volts. Heavier coats can handle a thousand volts or so, up to triple-insulated types which can handle several thousand and count as reinforced type. But the insulation thickness increases as a result, taking up more space (necessitates bigger core, and even longer winding length), and too much dimension raises the characteristic impedance of the pair (which needs to be close to 100Ω).
Also, as it happens, normal/average type enamel gives a fairly low characteristic impedance, so there is some advantage to the somewhat heavier coated wire.
In any case, what is economical and practical to produce, is compact transformers rated for 1500V peak isolation.
On to ESD.
Standard commercial level ESD is 8kV direct or 15kV air discharge. Assuming charge conservation, 15kV is the more stringent case. From 150pF (see IEC 61000-4-2), this divides down to 1.5kV at 9 times, or 1350pF minimum capacitance to ground; round up to 1.5nF. Likewise, round up the 1.5kV to a 2kV rating, and there's your standard capacitor value.
Larger values (2nF+) are acceptable for ESD purposes, and can be rated lower voltage as a result, but 2kV is a good figure for these minimal values. Larger values however worsen isolation (CMRR, leakage current at mains frequency, etc.), so smaller values are preferred.
This determines the capacitor value.
Notice the relevant current path: ESD comes in from the outside world, and returns through... whatever route it finds. In other words, ground/earth, enclosure, whatever. This is where the capacitor belongs.
If you don't have a metallic enclosure, then the PCB must be what is being used as enclosure/ground (ground plane). Then the capacitor goes to that.
If an enclosure is present, capacitance (or any other impedance) between it and PCB ground plane is a separate issue, determined by the nature of all connections crossing that barrier.
The resistors only serve to terminate resonances between pairs, mainly of relevance for immunity.