First, there is no reason to use cmd here; reg.exe is an exe that, like all exes, runs all by itself.
Next, you are updating a per-user value here -- that's the point of HKCU. During a task sequence, that equates to the local System account. Thus, what you have here works fine, it's just updating the wallpaper for an account that you can't log into or ever see it's desktop or wallpaper.
You need to either perform this a different way, or you need to update the value for every user. The best way to do the latter is to update the Default user's registry so that every user profile created on the system inherits the value. Here's a nice article that covers this in-depth: https://stealthpuppy.com/customize-the-windows-default-profile/