It’s an electric arc, not a flame. When something resists the flow of electric current (which pretty much everything except for superconductors do) then the energy gets converted into heat. The flow of electricity in a shock like that is too short and contains too little energy to heat up things noticably. A lightning bolt, on the other hand, is exactly the same thing on a much bigger scale. Most of the damage done to people by a lightning bolt is burn damage, and many forest fires and brush fires are started as a result of a lighning strike every year.
Electric arcs like what you describe are typically a discharge of several thousand volts (probably between 10,000 and 80,000 volts if you can see the spark) but very low current. Your stove cooks with a much lower voltage, but a much higher current. Much more energy gets transferred to the heating element because of this. Lightning is several million volts with several hundred thousand amps of current, which is so much energy that it can cook darn near anything despite being such a short duration.
Your fingers do get heated up slightly during a static discharge, but not enough to really be noticable. The pain comes from your nerve’s responses to the electricity flowing directly down through your nervous system.