How to turn a 0 to 5V square wave pulse into a -500mV to +500mV square pulse using just passive components?

You can use a 5:1 resistive divider followed by a DC blocking capacitor. You are going to have to use a large enough capacitor to get the RC time constant well below the fundamental frequency of the square wave.

schematic

simulate this circuit – Schematic created using CircuitLab

This can be simulated to see the various waveforms and experiment with the values and frequencies.