Peak Wavelength of Emission Spectrum of a Flame vs. Actual Flame Temperature
There seems to be a number of problems here.


spectrometers need to be calibrated in intensity on a wavelength-by-wavelength basis. Each part of the system has an efficiency which can vary with wavelength, but the grating response tends to be one of the strongest. Here is a random example of a grating efficiency curve from a Thorlabs catalog :




You can see right away that a grating efficiency curve can impose it's shape on the measured spectrum, generating a shape superficially similar to a blackbody, but totally instrumental. Without calibration for efficiency, you just have ADC counts vs wavelength raw data!


Fitting of a Plank shape should be done to the spectrum without ignoring the peaks. In other words, a good fitting program will fit the shape you are looking for (Plank) PLUS fit the peaks at the same time. And don't forget to calibrate intensity first (see 1.)!





" Is fitting the emission spectrum to a blackbody curve even appropriate for a non-blackbody emitter such as a flame?" Probably not unless you really know what you are doing. Flames are beautiful and complicated. There's thermal emission from gas in addition to peaks, but stronger is the blackbody-like emission from hot soot particles. Since there will be a distribution in temperatures within the 3D volume of a flame, you have a spectrum recorded from a significant fraction of the flame volume will include a variety of Plank spectra corresponding to different temperatures.


So the answer is: you have to do fitting, remove peaks by fitting them simultaneously, and more importantly, you must calibrate the spectrometer intensity, because grating efficiency curves look strangely Plank-like, althouth they fall to zero much faster above and below their useful wavelength range. Also have to deal with considering the sample volume of the flame and whether or not it's true black-body emission or not.

Those "peak" values, are closer to peak efficiency wavelengths of the spectrometer, and not really related to Wein's displacement law at all!