I don't think there are hard-and-fast rules when it comes to words that have been recently assimilated into English. The pronunciation that usually sticks is a halfway house between the original foreign pronunciation and what is easy for Anglophones to actually say.
To take your two examples:
A word like tortilla can just be pronounced as if it were an English word, tortia, without any Spanish accent. But you will still find English speakers who pronounce the double l, just like the do with paella and Marbella, and also the j of fajita and jalapeno as [dʒ], since they are unaware of the Spanish pronunciation.
The sounds in the Japanese word karaoke are a bit more foreign. The r in there is a very different liquid to the English r, English speakers aren't used to gliding from [a] to [o], and English words seldom end with with an [e]. Hence the slightly mangled /ˌkæriːˈoʊkiː/