Custom challenges aren't possible without directly overriding the whole challenge board, which would make it a compatibility nightmare with any other addon trying to do the same thing. The way the CTR pack does "hidden" tracks is by simply using the standard functionality of not unlocking the track until it's played, which happens with every track that doesn't have "NoVisitNeeded = True" in its map lump. (This is why, if you play online before unlocking all cups, you're likely to see some of the tracks you played unlocked before you actually play through their cups - it doesn't care how you play a track, just that you did at all.) The secret tracks in the base game, meanwhile, do have challenges defined that force you to unlock them more elaborately, meaning you can't just play Test Track online and have it unlocked for yourself, you still have to do the tutorial skip challenge first regardless. For either of the CTR hidden tracks, playing them online would be sufficient to unlock them for Match Race/Time Attack - there's no way I know of to force a separate unlock condition for addon tracks, or indeed any addon content at all.