No it can not cause ED when used as a shampoo; that is ridiculous. People that claim Nizoral gave them ED or really any side effects other than irritation are suffering from the nocebo effect.
People are so ridiculously paranoid about any hair loss treatment that they think all of them - even Minoxidil - can cause ED.
Keep in mind though, ketoconazole (the active chemical in Nizoral) can be prescribed orally for (I believe) fungal issues. I think one of the sides for oral keto might be ED, but i'm not entirely sure. This should go without saying, but likely many chemicals found in normal shampoos when concentrated and consumed orally on a regular basis would likely cause a number of side effects. Hell, consuming mouth wash is extremely dangerous, yet people gargle with it twice a day. Just remember there is a HUGE difference between applying something topically and consuming it!