vulchor: What was your level? Usually the only way you only receive a super low amount of XP for a quest is if the color of the quest font was grey, indicating that you were well over the suggested level for the quest. You also receive reduced XP for green quests, I believe. If you were under the level requirement and only got 1 XP, then it seems like you encountered a bug and may want to let CDPR know about it on their forums.
Boeriemore: I'm on level 38. Same level for both the quests discussed above.
A quest will become grey after you are 6 or more levels higher than it's suggested quest level, in this case 30 is eight levels lower than your current level, therefor you would get the bare minimum of XP for completing this quest, 1 XP. CDPR set this system up as a kind of control for level progression so that you wouldn't hit the level cap too quickly and become too powerful before the end of the game. If you don't like it, there are mods at the official home of Witcher 3 mods, Witcher 3 Nexus at Nexusmods.com.
If you would have done that quest while it was green or red you would have gotten real XP for it. The reason you got 150XP for clearing the town of monsters is because that isn't actually a quest, therefor those happenings give a default amount of XP regardless.
I hope my explanations have helped you understand why that happened. These aren't bugs, they are by design to help you have the best possible experience in the eyes of the designers. Personally, I didn't like it either which is why I installed a mod to give me full XP regardless of level. I also didn't like that you don't get much XP from killing monsters, so I downloaded a mod that allowed me to customize the percent of XP I got from monsters and quests. I reduced the XP gained from quests to 50%, but increased my monster-slaying XP to 400% and I've had an enjoyable time that feels more like a traditional RPG.
Boeriemore: No. I am not trying to complain. Just can't understand why a difficult battle reaps only one point while a simple battles reaps 150 points, irrespective of the level as both encounters were done on the same level.
WildHobgoblin: Mhm, I see what you mean, it seems explainable though - if you do a lvl 30 quest while being lvl 38 this quest is greyed out, hence you get very little xp for finishing it.
I seem to recall that liberating an abandoned area (which is not a quest per se) always gives the same amount of xp regardless of lvl (same as using axii succesful in conversations), even if you only have to slay three ghouls or sth...
I have always wondered though, if you finish a contract or sidequest, if you get only xp for finishing the quest or if you get xp for the kill as well. I always assumed it was so, but never bothered to check...
You get XP for both the monster slaying and for resolving the quest. However, CDPR didn't want the game to feel grindy, so the amount of XP earned from slaying monsters is negligible.