Mendix does not trim string attributes when storing them, but you could do this yourself in a before commit action.
Case sensitive/insensitive searching will depend on the database you're using. As far as I know all supported databases CAN be case insensitive or case sensitive but I believe only postgres is case sensitive by default.