If you're talking about the IAD-MAD service on EI metal then yes, you get EQMs since this is basically a wetlease and it's therefore a UA metal flight for all mileage purposes.
For any other codeshare, it is only the operating airline that counts and hence no EQMs if it's EI metal.