"That entire portion of the end of Colossians 2 talks about the danger of legalism and seems to discourage keeping things such as the Sabbath"
Actually, it doesn't talk about that. In fact it has quite the opposite meaning.
I once used Colossians as an example of exegesis:
https://rbutterworth.nfshost.com/Management/examples/exegesis
If you aren't going to read that article itself, at least be aware of the importance of the context in which Paul was writing.
The Colossian Church was isolated from the rest of Christianity. Most of the people there were Ascetics, who believed that the physical body represented evil while its immortal soul represented good. That soul must be developed by physical suffering, and so, anyone that enjoys themselves, celebrates, eats good food, etc. is obviously an evil carnal person.
The Ascetics were criticising the Christian converts for their religious practices, and Paul was worried that some of them might feel ashamed of their Christianity and revert back to Greek paganism. He warns them to "continue in the faith, stable and steadfast, not shifting from the hope of the gospel which you heard".
Here's the section on 2:17:
2:16-17 resumes the warning about being influenced by the opinions of
others:
Therefore let no one pass judgement on you in questions of food and
drink or with regard to a festival or a new moon or a sabbath. These
are only a shadow [prophetic symbolism] of what is to come; but the
substance [what casts the shadow, the eventual kingdom of God on
earth] belongs to Christ.
The original Greek did not use punctuation, but relied more on
sentence structure. This structure is sometimes lost in translation
into English (e.g. the original word order is no therefore man you
let-judge in meat …, the single Greek word being translated into let
and judge with other words intervening). Punctuation was supplied by
the translators, who also supplied additional words to make the
English read more smoothly or clearly. These added words are marked in
italics in the King James version, which translation (with supplied
words and punctuation omitted) perhaps provides an even better
interpretation of this passage:
Therefore
let
no man
judge you
in meat
or in drink
or in respect
of an holyday
or of the new moon
or of the sabbath
which are a shadow
of things to come
but the body of Christ
A much more obvious meaning
immediately becomes apparent: let no one but the body of Christ judge
you (the body of Christ being the Church). We should not feel bad
about being condemned by non-Christians for our Christian practices
such as honouring the symbols of God's promises.
The food and drink, festivals, new moons (monthly sabbaths), and
(weekly) sabbaths refer to things that the Christian community is
expected to practice, and not, as some suppose, to unclean foods and
pagan festivals. The Ascetics were opposed to any form of physical
pleasure (often including eating meat of any kind), and such holy
feasts and celebrations (which, except possibly for the Day of
Atonement, are a time of joy and pleasure to Christians) were a direct
insult to their beliefs. But these sabbaths and holy festivals are
symbols to Christians of God's plan for mankind, and must be
commemorated despite the objections of non-Christians.
In keeping God's sabbaths and festivals, a Christian will be subject
to criticism from others, and in particular that criticism may often
be of a very morally superior tone, possibly making the Christian feel
that he himself might be the one in the wrong.