<p>Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor.  Will the destructor be called when the DLL is unloaded?</p>

It should be called when either the application ends or the DLL is unloaded, whichever comes first.  Note that this is somewhat dependent on the actual runtime you're compiling against.
Also, beware non-trivial destructors as there are both timing and ordering issues. Your DLL may be unloaded
after
a DLL your destructor relies on, which would obviously cause issues.