DB2 should not delete the database directories when you uninstall, however, you would need to re-catalog the database after you reinstall. The safest and easiest way would be to take an offline backup, and then restore it after the re-install.
Make sure you maintain the full directory path of the backup (required on Windows only) so the restore will work correctly. Use the Command Center to recreate the restore script (without submitting it) right after the backup (before you uninstall DB2).