How Do Flow Matching Models Memorize and Generalize in Sample Data Subspaces?