You can download UE4 to any PC, you just install the launcher and log in to your account
If you’re moving to Windows 10 it’s probably best to backup your projects, you might be able to install on over Windows 7/8 and keep apps and files, but it’s always best to play it safe. Programs can be reinstalled, files can’t.