Is it bad for a baby's ears to breastfeed him in a lying down position?

Yes and no. There is some concern for the presence of milk over the Eustachian tube exit in this position, but positioning the kid vertically for 5-10 min after such a feed can cancel this out.
No. The position will not cause ear infections. And breast feeding will help decrease the incidence of ear infections.