Bitrate from file size
Bitrate for a target size is size in bits divided by duration in seconds. Fitting ten minutes into 500 MB needs about 6,990 kbps total, including audio — so around 6,700 kbps of video with 320 kbps of audio.
How to hit a target file size
Hitting a size target reliably needs two-pass encoding. A single pass has to guess how to allocate bits before it has seen the footage, and typically overshoots or undershoots by several per cent. Two-pass analyses the whole file first, then distributes the available bits toward the complex sections. For upload limits like Discord or an email attachment, that difference is the difference between a file that fits and one that needs re-encoding.
Questions
It depends on length. Ten minutes into 25 MB is about 350 kbps total, which will look poor above 480p.