Unified Representation Learning for Efficient Medical Image Analysis