Workbench 3.1 requires Kickstart 3.1 (3.0 might work too) and 512K RAM, you will have about 300K to play with after booting up, but installing 3.1 actually requires 1M because of the bloated installation tool and its huge script.
The installation is just a matter of copying files, so if you have a way of transferring files onto the hard drive of your 512K Amiga then you can just finish the installation in WinUAE and move the files over and you're good.