There are a few simple ways to create a spark, but the 9v battery requirement is going to be a big limitation.
1. The voltage is low, so limted on what you can drive with it,
2. The capacity is low. If you want more than a couple sparks, you'll need something else.
3. The voltage is DC. This reduces your options.
500kV will also be difficult. Possible (especially if AC power available), but you have fewer options at this level. If you target more like 30-50kV, there are more options.
Some other possibilities:
- circuit with TV flyback transformer
- automotive coil (12v (or 9v) to coil (+), coil (-) thru pushbutton switch (normally open) to ground)..will spark each time the button is pushed (actually on the release of the button). You'll probably need a resistor in the circuit since the coil current shoots up when it saturates. Electronic ignition modules in cars have built in current limitation to help with this (usually ~7A).
- automotive coil + igniter (such as GM HEI module). Add simple circuit (555 timer IC) to send pulses to igniter to fire the coil at some certain frequency
- van de Graaff generator (motor + belt)...works on static electricity
- magneto based ignition (lawnmower, weedeater, etc.). Spin magentic flywheel past pickup to induce the spark.
The automotive coil will probably be the easiest (and cheapest) to do, but you won't get 500kV out of it (more like 30kV for a stock coil and ~50kV or so for aftermarket)
How large of a gap do you need to jump? Is it possible to use a different power source? How many sparks do you need per charge (assuming your are stuck with a battery)?