Why does the word colonel (as in military rank) have such a strange spelling compared to how it's pronounced (or vice versa, although I don't know how you would pronounce that)?
It comes from Italian military manuals, and the English spelling preserves the Italian form, colonnello. Two pronunciations coexisted; the r prevailed in English. Spanish took both the spelling and pronunciation: coronel.
Colonel is spelt with two l's but pronounced as if it were spelt kernel (BE: /ˈkɜː.nəl/, AE: /ˈkɝː.nəl/). How on earth did this happen? The short answer is just because.
Why is 'colonel' spelt that way
By the 15th century, Italian forces were known for being good at war, so many Italian war terms spread across Europe, including the word colonel. It stems from the Italian word colonnello, which was in turn derived from colonna meaning column, this was because the rank was assigned to the commander of a column of troops.
Then there's the influence of French on colonel. They also borrowed it from Italian colonnello; however, they changed it to coronel. The second l changed to an r probably because of dissimilation1. It's a process by which two (similar) sounds (l...l in 'colonnello') become less alike or different than they were before.
At the same time, there was also a coronel in Spanish. However, the Spanish word seems to have derived from corona, in that it appears to designate an officer of the crown rather than an officer of the column.
Trask in his Trask's Historical Linguistics says that English bizarrely uses the Italian-type spelling but the Spanish-type pronunciation. It is possible that both the French and the Spanish pronunciation affected the English version of the word.
Why did colonnello change to coronel in French
One reason for dissimilation is that our speech organs can get weary of making the same sound (or very similar sounds) repeatedly. For example, the Latin word arbor ('tree') has become árbol in Spanish, in which the second of the two occurrences of [r] has been dissimilated to an [l] (Trask).
Dissimilation of liquids (/r/ and /l/) is particularly common. Colonel pronounced /ˈkɜː.nəl/ (AE: /ˈkɝː.nəl/) is a case of Dissimilation of /l..l/ to /r..l/.
The opposite process of the above happened with the Latin word peregrinus (pilgrim), when the first r was changed to an l. It's a case of Dissimilation of /r..r/ to /l..r/. (Now it’s peregrino in Spanish and Pellegrino in Italian. English inherited the l version in pilgrim.)
How the spelling 'colonel' prevailed
By the late 16th century, English scholars started producing translations of old Italian treatises. The original spelling with l's then started seeping into English. Under the influence of the originals, people started spelling it colonel to conform with the Italian form through translations of Italian military manuals. The spelling colonel had been standardised by the middle of the 17th century but the pronunciation with r was still popular and it won out eventually. (French switched back to 'colonel', probably because of the second round of dissimilation.)
Syncope of the 'o' in the second syllable
I explained the reason why there's an r in its pronunciation. But why is it pronounced with two syllables and not three? Well, that's because the o is in an unstressed syllable and that syllable is coda-less as well. Unstressed and coda-less syllables are rather prone to syncope. Syncope is the loss of segments from the interior of a word, especially unstressed vowel and sometimes syllables. For example, the unstressed, coda-less syllables in words like fam.ly, cam.ra, av.rage, choc.late have been syncopated for many speakers. Also, when a stressed syllable is followed by two (or more) unstressed syllables, the vowel immediately following the stressed syllable is usually dropped in colloquial speech. The same thing might have happened to the second syllable of colonel.
And about the vowel in the first syllable, it must have been the same as in world, word, work while entering English, though I'm not entirely sure about that.
That's all, really.
As reported from the NOAD:
ORIGIN middle 16th Century: from obsolete French coronel (earlier form of colonel), from Italian colonnello (column of soldiers) from colonna (column) from Latin columna. The form coronel, source of the modern pronunciation, was usual until the middle 17th Century.
The word is pronounced in a strange way because it kept the old pronunciation, while the word changed spelling.