Yes, all software will work between desktop environments with little issues.
Lets say that you are using Xfce (GKT2) and you want to install software that was built for GNOME Shell (GTK3), all the libraries that are necessary to run that application will be downloaded (and that might be "a lot"), the same goes for other desktop environments.
It will not harm your system, but it might be too much compared with the size of the application that you want to use.
An example: Let's say I want to install Kate (the beautiful text editor from KDE, less than 1MB for the application itself) in my clean Ubuntu desktop. It will pull 65MB of packages and in the end will occupy more than 180MB in total because it pulls a lot of dependencies:
I mean, what is 180MB now a days? Not much, but compared with the 1MB that the application actually is... Does not make much sense and will drive most users to look for alternatives elsewhere.