Not sure of the premise of this thread. the P-38 made an excellent (albeit expensive) fighter-bomber and had a very good record doing that. Good firepower, good range, able to carry a fair range of ordinance. Pretty fast and agile at low altitudes, could hold its own as a fighter if caught that way.
But as a pure bomber? Makes no sense. Hang too much outside and the performance and range drops (as per all fighter-bombers). So I'm not sure what the argument is about.
Plus what bomber do you compare it to, the US mediums (B-25s and so on), the Lanc, or the B-17 or the bomber version Mossies?
I would leave the heavies out of a comparison. Even as bombers the planes don't really do the same job. Using the "what could it carry to Berlin yardstick" the P-38 comes up way short. But B-17s don't do close support well and don't strafe on the way back.
as for cost, A-20s went from $98-138,000 depending on model and contract. B-25s went from $139-172,000, B-26s from $200-306,000, A-26s about $235,000, B-17s $230-300,000 and B-24s $250-360,000. In many cases the lowest price was for the last models built. Contract for the A-26D was $181,000 per plane but the contract was canceled on VJ day.
You really have to compare it as a fighter-bomber vs Typhoons, P-47s, Spits, Mustangs, FB Mossies, etc. As such it (AFAIK) it held up well. It's biggest weaknesses in this role were probably its size (a similar weakness to the Mossie as a FB) and cost (both in building and running).
Not sure on the cost of running, two V-12s have 48 spark plugs. One R-2800 has 36 and the Typhoon has 48 spark plugs for it's
one engine

Spark plugs are not the only thing but not ALL single engine fighters had the same maintenance costs either.
Down on the deck, the fundamental flaw of the design, its miserable mach limit, was not an issue. It was pretty quick and probably (not sure of this though so I stand to be corrected) more manoeuvrable, especially in the vertical plane, than a P-47 (which was nearly as expensive to build). It probably (again I stand to be corrected) could carry a heavier load than a comparable P-47 of the time, quite possibly for further (in a permissible environment of course).
For load the P-38 wins hands down and not until the P-47N does the P-47 show up well in range carrying bombs. But neither one can carry a pair of 1000lb bombs as far as a Mustang can with a rear tank.
Could it maybe carry as much as the US medium bombers. Maybe close in weight, but not of course in numbers, but that is more a reflection of the poor performance of those 'bombers' than saying something great about the P-38, plus the performance hots would have been huge.. Heck, FW-190s were carrying 2,000lb+ bombs in 1943..... P-47s were carrying comparable bombs later (though they took half the length of the World to take off ...).
You are back to the bomb load vs range argument, it doesn't matter what you can get off the ground if you can't reach the desired target with it. Most of the 'middle' B-17s had racks under the wing for a pair of bombs up to 4000lbs each and were 'rated' as carrying over 17,000lbs of bombs. They just had trouble reaching the French coast with such a load
Later versions often deleted the external racks because they were so seldom used in service.
German and Russian fighter bombers could carry bigger bombs/bomb loads in many cases because they were very close to the targets/front lines. Add a 100 mile overwater flight to and from the target and range gets a
LOT more important. Sit in fixed/slow moving positions (Italian campaign) or even doing the North African shuffle and some fighter bombers wound up carrying some rather large loads (six 250lb bombs under a P-40).
So good as a FB, albeit expensive. Able to 'hold its own' as they say.
P-38s did a lot of good work as bombers but were often an expensive solution BUT one that was already in place. It could take months to deploy new squadrons with different aircraft from the US to the combat theaters. Or even months to re-equip existing squadrons with a different type of aircraft.
" The development work was carried out at Lockheed's modification centre at Langford Lodge, Northern Island" as was the modification of many (if not all?) of the droop snoots used in Europe.