Could you email me a copy of your metadata and I will take a look at where it could be going wrong? I assume it has something to do with the header lines. In the meanwhile you can use read_tsv to import your data, and parameter skip=1 if you need to remove a definition line.
If I am understanding your second question properly, I would recommend having only one massive metadata file, In the example you posted, I think I used group as a generic term, but it could be any column in your metadata file, you don't need to create a new file with only two columns.
I just exported the data (in this case family-level data) as csv from the barplot in qiime2view and ran your code. I did not realize that the barplot csv file exported from qiime2 in qiime2view would already have the metadata incorporated in the csv file at the very end as the last few columns. This is much easier than trying to combine the metadata and features table manually.
The code: