Yes, you'll get the miles and EQMs.
I have an upcoming series of DL flights that are KL coded and called the Gold desk two weeks ago to find out exactly what the deal is. A supervisor said that I should be fine, but to call MileagePlan customer service. This I did, and was told that
a)I would earn the miles and EQMs;
b)Their system should decipher the codeshares and automatically post;
3)To hang onto my boarding passes just in case.