Investors cash in on market recovery and rotate funds into mid- and small-cap schemes despite elevated valuations