+1, try a "riser" stem. Your shop should have several around that you can try on for size. It takes ~10 minutes to swap stems with a threadless steerer.
40 degrees is not crazy, especially since your stem may already have 17 degrees of rise.
Flat bars and drop bars have different outer diameters, so changing to flat bars requires lots of changes, including:
different brake levers, probably new cables and housing
different shifters (and possibly, a different FD to match the shifter), probably new cables and housing.