I wouldn't recommend drilling all the 2x4's in a wall for a length of 2" pipe, as there wouldn't be much left to the stud. You could run the pipes between the outside and a 2x4 wall, or you could build a 2x6 wall and drill it.
Most basement walls are not very flat, and building directly on it may lead to a wall that is wavy or not straight. You would also be risking moisture wicking into the wood from the outside walls. It would be forward-thinking to insulate the outside wall with 2" XPS foam board and build a stud wall to the inside of that. It would beat having to re-do it if you decided to finish the basement more in the future.
You haven't showed us anything that is against code, but you have not really showed us how you will install the pipe. You cannot connect the vent to a drain pipe in the basement. The vent must be within 6' of the trap at the washer and go up through the roof.