In hopes of answering this question, I investigated Google Books search results to see where and when the (presumably phonetic) spellings baloney and boloney—as well as the standard spelling bologna—arose in English and who used them. The results are intriguing.
Early instances of 'baloney'
By far the earliest occurrence of the spelling baloney in a Google Books search for baloney and boloney is from Julius Caesar Hannibal, "Lecture X. The New Road," in Black Diamonds, Or, Humor, Satire, and Sentiment, Treated Scientifically (1856), a collection of comic pseudo-lectures published in the New York Picayune and written in a ludicrous faux-Black dialect:
Santa Klaus visited sebral ob de early risin' gineration ob dis congregation, and left peanuts, baloney sassage, and odder good tings. Anty Cuff hung up her 'tockin, but one ob de board ob health happened to “smell a rat,” ordered it down, else ders no 'noin what might hab bin in it.
A second early instance of baloney appears in Irish-dialect and German-dialect dialogue from H.N. Warren, Tilmon Joy, the Emancipator in The Declaration of Independence and War History: Bull Run to the Appomattox (1894):
DENIS.—Come on, Dutchy, go with us. We are after going to see the Mayor. He will tell us how to get you don "mit Siegel," where you can whit your appetite on bullets and shell instid of baloney sassage and sauer krout.
SPRECKELS (taking her [Katrina Obershine] by the hand).—I am yost so happy as a big baloney sausage to see you Miss Katrina. Would you be so kind as to go and get married mit me right away quick, so I was too much for dot Irisher? (pointing to Denis.)
And a third in another Irish-American setting in Edward Harrigan, The Mulligans (1901):
"An' this is what I married ye for? A dacent Irish girl that had twilve dollars a month in the first families, to marry ye, a baloney puddin' butcher, an' to find ye here, making love to a woman in a nager barber shop. O-oh! Lochmuller! Lochmuller!!" she cried, releasing him and bursting into tears.
Later in that same book, a character refers to "de Cramps Hayleesey and de Boy de Boloney," indicating that Boulogne was as liable as Bologna to be reduced to dialect baloney.
The word baloney appears without accompany sausage in Mary Plummer, "The Milk Commission of Chicago and its Work of the Past Summer," in Charities: A Review of Local and General Philanthropy (September 5, 1903):
Many pathetic and ludicrous stories have come to us. At first much milk was returned because of the "yellow scum on top" which was thought to be medicine. Never to have seen cream before is a volume in itself. Many mother have been persuaded to keep babies on milk alone where before they were given "scraps of most anything." One mother said that her nursing baby "seemed to crave baloney," but that now it was content with its milk.
Update (July 19, 2020): Early newspaper databases matches
An Elephind newspaper database search turns up an even earlier instance of "baloney" from Julius Caesar Hannibal, "Scientific Discourse: 'Malgamation" in the [Carmel, New York] Democratic Courier (August 28, 1851), reprinted from the New York Picyune:
Ef I had a dartur, and she was as humbly as de rinosinhoss, befor one ob dese wite raskals [abolitionists] shood lay his purlash hand on her welvet skin, !'d do as do ole Roman Warginious ob ole did, wen ole King Kruso, tried to lay wiolata hands on de pusson ob he darter—I'd smash him cross de chops with a Baloney sassenger[.]
However, the next valid match doesn't occur until almost sixty years later. From William Ridgway, "Iron Rose Bible Class," in the San Bernardino [California] Sun (June 6, 1911):
Poor old Buck and Berry as a runaway ox team was one of the most pitiful and ludicrous sights of the country side. It often used to wind up In broken bones and "baloney" sausage. Oxen are driven with a "whoa haw Buck" and a "gee yea Berry." That Is the way God wants to guide his children (Deut. 4:6.) Words not rods.
Early instances of 'boloney'
A competing spelling (though probably pronounced the same) was boloney. Two early examples of this spelling appear in dialect works from England and the United States. From James Payn, Melibœus in London (1862):
'We was right, Bill. He's begun it already; here he is a-pumping away like anythink. Perhaps,' added he, in a tone of pretended conciliation, 'you would like to make a note of what I got for supper in this here pocket-handkerchief. Well, it's Boloney sausage, which, on account of your blessed Underground Railway, one cannot find five minutes to eat in peace. Tell 'em that, will yer?'
And from Vandyke Browne [William Brannan], Harp of a Thousand Strings: With an Autobiography of the Author, Jabez Flint (1865):
He likewise kept a small famerly grosery, whar the abrogoines ov that regin procurde thar stock ov nessysarys—naimly : rot-gut whisky, corn meal, soft soap, hard sider, fish hooks, caliker, pokejoos corjial, bacon, rifle brandy, and in short all the indispesablulls ov a fust-class Hardshell [Baptist] grosery, together with the Sarms ov Watts'-name, Bunion's Progress on the Toes, and other works essential to the eddycation ov benited hethens, includin gimberlets and Boloney sarsengers. The arkiticktral buty ov our famerly manshon spoke for itself—like the New York Acadermy ov Fine Arts—wich latter Is ringstreeked and speckild like onto the spots ov the boyconstructor—very muchly.
The slang use of boloney to mean (in the context of boxing) a stiff or a palooka appears in H.C. Witwer, The Leather Pushers: Round Two," in Collier's: The National Weekly (June 5, 1920):
After Kane Halliday, alias Kid Roberts, had won his first professional fight by knockin' out a boloney with the nom du ring of Young Du Fresne in Sandusky, we have to lay aside the gloves for a spell on account of the Kid havin' busted some small bones in his left hand.
"Well," I says when he got it all off his chest and looked half relieved and half sorry for tellin' me, "they's only one way we can absorb enough pennies to get en route for the bustlin' little hamlet of New York, and that's for you to bounce some baloney at this fight club here. ..."
'Bologna' as the spelling of the sausage
A Google Books search for the years 1800–1930 turns up surprisingly few matches for bologna as the spelling of the sausage. The earliest matches in running text are from 1826 and 1828. From William Duane, A Visit to Colombia: In the Years 1822 & 1823 (1826):
Our night's repose was comfortable, as blankets were abundant, and we rose about seven o'clock in the morning of the 28th December, and had scarcely appeared when an excellent breakfast of both coffee and chocolate, with cakes fresh and well baked, some Bologna sausages without garlic, and some very excellent fruit which the alcalde had sent for in the preceding night to the lower regions ; ...
And from Margaret Smith, What Is Gentility? A Moral Tale (1828):
"And these Bologna sausages," said the old man, smiling as he laid an emphasis on the word Bologna, "are, I assure you, as fine as any in the world, though Martha made and smoked them herself."
Here the noun seems to be "Bologna sausage," with Bologna performing much the same role as Brussels in "Brussels sprouts." The word bologna spelled with a lowercase b and standing alone as a noun referring to a type of sausage appears no later than 1903, although (as noted earlier) baloney also appears by itself by that date.
The phonetic spellings of baloney and boloney from the middle of the nineteenth century suggest that the pronunciation was common from the earliest days of working-class awareness of "Bologna sausage" as a food. The predominance of unschooled speakers in early allusions to baloney/boloney supports a straightforward explanation for the pronunciation: illiterate English speakers heard the word Bologna but mimicked it as the more anglophonic baloney, and writers attempting to replicate that pronunciation split on the spellings baloney and boloney.
Perhaps the more challenging question is, Why didn't lasagna come out as lazonney (or something similar)? The answer may be that working-class non-Italians in the English-speaking world didn't become generally aware of lasagna as a food until long after they had assimilated bologna into their diets—at any rate, a Google Books search finds no instances of characters in books speaking in German, Irish, Black, or Backwoods English dialect referring to lazonney, lazoney, lazaney, lazanney, lasonney, lasoney, lasaney, or lasanney (or for that matter, lasagna).
The references to lasagna—and they are not rare in the nineteenth century—are usually by travelers in Italy or by cookbook writers and their clients in Britain or the United States. This is clearly a more affluent and more literate crowd than the folk who appear in nineteenth-century references to baloney/boloney.