It comes down to how hot you can get the can get the jar with a candle.
If your food contains water, then it will only heat above 100° C if it is under pressure, which means you'll need to seal the jar. Maybe, the jar is strong enough that its internal temperature could reach 120° C. If so, then maintaining that temperature for a while would kill all the microbes, and the food would be preserved.
On the other hand, maybe the pressure inside the jar would cause it to explode before the desired temperature was reached.
On the other other hand, maybe the jar would radiate heat too quickly--and absorb heat from the candle too slowly--so that it would never reach 120° C. You might be able to work around this by building some kind of reflective insulating enclosure for the jar, but it would be difficult to properly insulate it without also cutting off the air to the candle.
So the answer is maybe but I wouldn't recommend it.