There is a monetary incentive for the company running online systems such as banks to keep things secure(ish). They are made by mostly technically savvy people and in general are audited properly.
Electronic voting goes to the lowest bidder. They have no incentive to keep things secure and test it properly as that would cost more and cut their middle line. It just needs to work and look secure.