Presumably the reason you're cooking directly on the oven rack is to let the fat drip down. If so, do yourself a favour and get yourself a roasting rack. It's an inexpensive piece of equipment that you place in a baking pan or on a cookie sheet; the food cooks on the rack and the pan/sheet catches all the drippings. Way better than trying to replace an entire oven rack.
And if you really hate cleanup, you can line the pan with parchment paper or aluminum foil and just throw the rack in the dishwasher when you're done.
Smoke is normal in an electric oven, but flames are definitely not.
In order to start a fire, you either need a spark, or you need to heat something beyond its autoignition temperature (AKA kindling point). You might have had a short - or you might actually be using a gas oven with spark ignition - but I'm guessing your issue was the latter.
Cooking oil or grease being heated beyond its autoignition point is one of the most common causes of kitchen fires (grease fires). Supposedly, some oils have autoignition points as low as 550° F (or 288° C), though I'm not sure which oils those are. Olive oil would be my guess as the lowest, but pepperoni grease could very well have ignited at self-cleaning temperatures (which, as you noticed, go up to nearly 1000° F).
Fortunately for you, all modern ovens have a mechanical interlock which prevents them from being opened during a self-cleaning cycle. If you'd opened it, you would have made the problem a lot worse by (a) supplying the fire with abundant oxygen, and (b) drawing all the hot air and flames out of the oven and into your kitchen, quite possibly setting your whole home on fire. Heat wants to move to where it's cold; that's why you keep your doors and windows closed in the winter.
There are a multitude of oven cleaners available for self-cleaning ovens - you are supposed to use these before you run a self-cleaning cycle. Yes, I know it's odd, but "self-cleaning" doesn't really actually mean that it cleans itself, it just gives you a little extra help. You need to try to clear out all the grease and big chunks of food first using one of these cleaners, then run the self-cleaning cycle to deal with anything you might have missed.
Best Answer
The racks are probably chromed, so you should not have to season them.
I'd remove them from the oven and give them a good wipe with clear water to remove and residues that the self-cleaning cycle might put on them (especially if you you cleaning products).
And also wipe clean the channels where the racks slide in the oven (on each side)