I woke up this morning with the answer.
It is becoming common for me to dream with algorithmic solutions, and this one came directly from the realms of dreams.
I'll make a 2D array with the size of the amount of tiles I'll use to build the level.
Then, every loop I'll check the position of all entities I want to apply physics to and then I'll interpolate this position to retrieve the position in that grid the sprite is - dividing the screen position by the sprite size and correcting the result, obviously.
Then, I'll check the adjacent positions in the grid to check if they are walls or empty spaces. If the grid tile below the current position is a wall, I can stop applying gravity. If the tile in the direction of the sprite movement is a wall, I can stop moving it. If the tile above the current sprite position is a wall, I can stop accelerating it up when jumping and so on.
I believe this is the best solution and the fastest in processing time, since I'll use static screens to produce the game world - like old ATARI games - and the sprites will have a very limited space to move on.
What do you think? I am becoming good in sleeping and programming at the same time, hehehehe.

God is real - except if declared as integer.