Bacteria or viruses can cause a middle ear infection: Bacteria, like Streptococcus pneumoniae and Haemophilus influenzae (nontypeable) are the two most common bacteria causing middle ear infection. Viruses, like those that cause colds can cause middle ear infection.