Windows thinks that the trailing \" means an escaped version of " and doesn't see it as a normal " which would end the argument's quoting. So you need one more \ if you want to end the first arg with a \ character.
perl test.pl "D:\First Folder\test\\" "D:\Second Folder"
This is a Windows shell thing and there is really nothing that Perl can do about it.