FlexCare: Leveraging Cross-Task Synergy for Flexible Multimodal Healthcare Prediction