The House voted along bipartisan lines to condemn socialism in a resolution highlighting the ideology's historical failures.