Not likely. If e coli causes inflammation of the testes or the passages leading from the testes to the urethra, there is the theoretical possibility of infertility. Most e coli infections involve the urinary tract and do not cause infertility.
Sometimes. It depends where the infection is. E coli infection in the form of an abscess in the pelvis or causing pelvic infection in general can lead to scarring. The scarring can damage the fallopian tubes and/or the ovaries making it more difficult o become pregnant. On the other hand, a urine infection with e coli should not have any effect of fertility.