Is February 19 the day you would arrive in Spain, or is it the departure date from Boston? Is February 26 the day you depart for home? If you arrive on Feb 19 and depart on Feb 26, that gives you just six full days in Spain, which isn't a lot of time to try to see both Madrid and Barcelona, not to mention that each of those cities has some excellent side-trips. Madrid has arguably the best set of convenient side-trips in Europe: Toledo, Segovia, Salamanca, Cuenca, Alcala de Henares, etc.
Unless there's another bad COVID spike I wouldn't expect things to be closed in Madrid or Barcelona. Those are huge cities; they do not remotely shut down in the winter any more than Boston does. However, weather in the center of the country (around Madrid) probably won't be especially warm. (I've been to Boston several times in January, and it would be really freaky if Madrid was that bad.) Barcelona will probably be considerably more pleasant than Madrid. Wikipedia's entries for major cities nearly always include a climate-summary chart that will give you an idea how those two cities compare. I use that data especially when I'm wondering about rainfall. However, take into account that monthly averages hide extremes, and it's the extremes that are likely to make us uncomfortable. In addition, the summary data reported by Wikipedia is usually based on a time period that cuts off in 2010. I think we all know weather has gotten flakier since then, so I'm not at all sure those averages are accurate anymore, even as averages.
I like to do a lot of outdoor walking in cities, so weather matters to me more than it does to many other tourists. Therefore, I always consult the actual, historical, day-by-day weather statistics available for about the last ten years on the website timeanddate.com. You can scroll across the time period you're considering for multiple years (I recommend five) and see how many days were cold, etc. I've given you a link for Madrid's February 2021 weather data, but please do check 2020, etc.
If I had an expiring flight credit and a burning desire to see the art museums in Madrid I might be willing to go in February, though it certainly would not be my preference. I'd be more willing to hit Barcelona at that time of year for its wackadoodle modernista architecture (and museums of its own, of course). But if you would like to maximize your chances of weather that will make you forget winter in Boston, I urge you to consider Andalucia. It will almost certainly be warmer and drier there than in Madrid and Barcelona. You'd have enough time to Seville and Cordoba. Seville and Granada would be possible if you truly have six full days, but Granada won't be as warm and the days will be fairly short in February, limiting your outdoor sightseeing time, so I'd probably opt for Seville + Cordoba.
I realize you may be locked in to flying into Madrid or Barcelona because of the sometimes-much-more-costly airfare to other Spanish cities. There's very rapid rail service from Madrid to Cordoba and on to Seville.
Have you contacted your airline to see whether it will extend your credit? I know many airlines have done that.
Can you add more days to your trip? It's a long way to go for only about a week, and Spain is really sight-rich.
The earliest I've been to Europe was the second week of April and that was Andalucia. I think even if you go to Madrid, you should get by with layers. One or two (layerable) pairs of long johns (polypropylene, but merino wool is also great) under rain-shedding 97% nylon slacks will help prevent that chilled-to-the-bone feeling you can get on cold, rainy days. Above the waist I layer a waterproof rain jacket over a fleece jacket. Let's see what those with winter experience in Spain say.